Hexo+Github博客备份方法
来源:互联网 发布:网络是否应该受管制 编辑:程序博客网 时间:2024/06/10 06:59
Why
使用hexo+github搭建的博客,博客作为一个单独的github仓库存在,可是仓库中不包含你每篇博客的源文件。如果你换了一台机器想要更新博客或者想重新发布以前的博客,这就不好办了。我这里推荐一种云端备份的方法。
How
- 首先,在你博客的仓库中新开一个分支,作为backup(master为博客的推送分支),并且设为默认分支。
- 将远程仓库获取到本地(两个仓库都需要获取)。
- 每次写完博客之前,需要先获取更新:
git pull
- 写完后,对backup分支进行备份:
git add .git commit -m "message"git push
- 然后更新博客到master分支:
hexo n "postName" # hexo new 新建文章hexo g # hexo generate 生成静态页面至public目录hexo s # hexo server 开启预览访问端口(默认端口4000,'ctrl + c'关闭server)hexo d # hexo deploy #将.deploy目录部署到GitHubhexo clean
- 最后将master分支的修改获取到本地:
git pull
About me
- GitHub:AnSwErYWJ
- Blog:http://www.answerywj.com
- Email:yuanweijie1993@gmail.com
- Weibo:@AnSwEr不是答案
- CSDN:AnSwEr不是答案的专栏
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
本作品采用知识共享署名-相同方式共享 4.0 国际许可协议进行许可。
0 0
- Hexo+Github博客备份方法
- 使用Hexo搭建博客,备份至GitHub过程
- hexo搭建github博客
- Hexo+GitHub博客
- hexo + github 个人博客
- gitHub hexo 个人博客
- hexo+github搭建博客
- Hexo+Github 博客搭建
- GitHub+Hexo建博客
- Hexo+github博客搭建
- github+hexo博客搭建
- Hexo Github 搭建博客
- Hexo + GitHub 博客搭建
- hexo+github搭建博客
- hexo + github 博客搭建
- hexo+github 搭建博客
- Hexo + Github搭建博客
- github+hexo搭建博客
- 封装selenium
- 滴滴2017校招算法工程师笔试题--吃饭问题
- NestedScrollView和RecyclerView使用,并设置间距
- 024.RemoteViews的内部机制
- jdbc.properties内部属性讲解
- Hexo+Github博客备份方法
- char 类 数组的插入
- C#实现调用Java类中方法
- qt程序图标设置
- int类 数组的插入
- Java 获取Date的“昨天”和“明天”
- APNS 状态归纳
- 测试用例的数值代入和减少查询条件方法
- 《核心动画——组动画)》