git克隆部分文件
1 2 3 4 5 6 7 8
| git clone -n --filter=blob:none git://github.com/vxunderground/MalwareSourceCode.git MalwareSourceCode cd MalwareSourceCode git sparse-checkout init git sparse-checkout set Python/ Win32/ Linux/ git sparse-checkout list
git pull origin main git checkout main -- Win32/Botnets
|
1
| git clone -b main --depth=1 --filter=blob:none --sparse https://github.com/vxunderground/MalwareSourceCode.git MalwareSourceCode
|
首先,在github网页端的控制界面从master分出一个分支hexo;
1 2 3 4 5 6 7 8 9
| git clone -b hexo git@github.com:MemoryOfSnow/MemoryOfSnow.github.io.git blog
git config --global user.email "you@example.com" git config --global user.name "MemoryOfSnow"
git push --set-upstream origin hexo --force
git checkout -b hexo
|
hexo的_config.yml将分支设置为master,而整个文件夹设置为hexo分支,这样就可以实现多设备共同维护博客了。
写完博客后
1 2 3 4 5
| hexo g -d
git add . git commit -m "a new file" git push
|
脚本如下:
1 2 3 4 5
| git add . git commit -m "bat auto push:%date:~0,10%,%time:~0,8%" :: git commit -m "%commitMessage%" git push origin hexo @echo done,
|
.gitignore文件内容
1 2 3 4 5 6 7
| .DS_Store Thumbs.db db.json *.log node_modules/ public/ .deploy*/
|