使用 Octopress+GitHub Pages 搭建个人博客

2017-04-12  本文已影响33人  茗涙

网上很多教程,可以自行搜索,下面是我的操作流程以及中途遇到的坑。

octopress bundle bundle install 默认主题 _config.yml文件 修改后的文件 设置url 第一篇测试博客 ranke deploy rejected refusing

我在Github新建一个仓库,写了License,然后把本地一个写了很久仓库上传。
先pull,因为两个仓库不同,发现refusing to merge unrelated histories,无法pull
因为他们是两个不同的项目,要把两个不同的项目合并,git需要添加一句代码,在git pull,这句代码是在git 2.9.2版本发生的,最新的版本需要添加--allow-unrelated-histories
假如我们的源是origin,分支是master,那么我们 需要这样写git pull origin master ----allow-unrelated-histories需要知道,我们的源可以是本地的路径

pull成功 git status

使用git diff命令查看提交的内容


git diff 错误提示 ruby版本 rake watch

优化博客的访问速度

优化

最后,成功!


成功

Reference

[参考链接](http://blog.csdn.net/caiqinghua0201/article/details/10371409
http://toughcoder.net/blog/2014/10/16/blogging-like-a-hacker-with-github-pages/

上一篇 下一篇

猜你喜欢

热点阅读