backup

  1. 博客备份至github分支

博客备份至github分支

博客根目录执行以下命令

    git init 
    git checkout -b hexo //创建hexo分支,存放博客源码
    git add  .  //添加文件
    git commit -m "博客备分"
    git remote add origin  git@github.com:fulndon/fulndon.github.io.git   //添加远程仓库
    git push origin hexo

commit前,需要先更新分支上的代码

    $ git pull origin hexo --allow-unrelated-histories
git init 
git checkout -b hexo //创建hexo分支,存放博客源码
git add  .  //添加文件
git commit -m "博客备分"
git remote add origin  git@github.com:fulndon/fulndon.github.io.git   //添加远程仓库
git push origin hexo

转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 fulndon@qq.com

💰

×

Help us with donation