Appearance
创建git仓库

克隆仓库到本地

bash
git clone https://gitee.com/jiang_yuhui/myblog.git将.git文件夹放入hexo根目录中,同时删除themes/butterfly中的.git文件夹
如果使用git克隆过主题,要主题文件中的.git文件夹删掉,git不能嵌套上传。显示隐藏文件,检查一下有没有,否则上传会出错。
上传至git仓库
bash
git add .
git commit -m "blog更新"
git push origin master制作快速备份小工具
新建博客源码备份.sh文件,输入以下内容:
bash
echo "Start"
cd /e/blog
git add .
git commit -m “blog更新”
git push
echo "Finish"
echo 按任意键继续
read -n 1其中第二行/e/blog就是电脑上hexo根目录路径
以上就大功告成啦~