在使用atom进行基于Jekyll的静态博客的开发的过程中,由于在github中不支持在网页中使用插件(就是我们开发时,会在_plugins文件中编写的Ruby文件,这些插件可以完成一个或者多个的功能),因此我采用的办法是将在github的同一个账号下建立两个仓库repo,一个仓库使用的是gh-pages分支经过Jekyll进行编译(jekyll build)好的html文件,另外一个仓库使用的是master分支向github的同名仓库推送源代码。

这样子,如果使用命令行的话,那么就是这样子。

首先,cd到源代码的磁盘目录(Repo1)下
cd Repo1-path
Repo1(master): git add .
Repo1(master): git add .
Repo1(master): git commit --all -m "commit infomation"
Repo1(master): git remote add origin https://github.com/guodidi/SkyWalker
Repo1(master): git push origin master
Repo1(master): git rm origin

然后切换另外一个仓库(Repo2)
cd Repo1-path\_site\
Repo2(master): git checkout gh-pages
Repo2(gh-pages): git add .
Repo2(gh-pages): git commit --all -m "commit infomation"
Repo2(gh-pages): git remote add origin https(gh-pages)://github.com/guodidi/SkyWalker_source_code
Repo2(gh-pages): git push origin gh-pages
Repo2(gh-pages): git rm origin

那么修改多次的话,那么重复性的工作就变得太多了。因此,我查找了atom上著名的插件git-plus,然后我折腾了整整一天,然后很成功的失败了。于是我就估摸着换个工具使用,然后我自己放弃了,我看不懂英文!!!

后来转念一想,总不能每次都是打命令吧。这种没成长的工作实在是不想做,没进步就没意义。突然间灵光一闪,前些日子,我装过github 桌面版,可以使用github 桌面版进行提交,而且操作步骤相当少,对于github 桌面版的使用下个博文进行详细进行介绍。