Blogging with github pages part1


本篇记录在Windows7 64bits环境下连接Github,Clone和提交Github-Pages博客仓库。


以下所用软件及版本如下,都已搜集到度盘这里共享,供各位参考:

  • msysGit-fullinstall-1.8.1.2-preview20130201.exe
  • rubyinstaller-2.0.0-p576-x64.exe
  • python-2.7.3.msi
  • DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe
  • git-credential-winstore.exe

下面以本博客为例说明:


注册Github帐号:yinwer81,创建yinwer81.github.com仓库(仓库名必须是账号后面加上github.com后缀,全称),下载并安装msysgit到C:\msysgit,克隆空库后设置非全局的user.nameuser.email信息,参考如下命令:

$ git clone https://github.com/yinwer81/yinwer81.github.com.git
$ cd yinwer81.github.com/
$ git config user.name "yinwer81"
$ git config user.email "yinwer81@gmail.com"

Clone喜欢的博客模板到本地(我对前端不擅长,且非常喜欢这个博客模板,非常感谢Jim的辛勤劳动。)

$ git clone https://github.com/dashjim/dashjim.github.com.git

拷贝dashjim.github.com文件夹中所有内容(.git目录除外)到yinwer81.github.com文件夹中,删除Jim的原有博文并修改相关配置信息,然后提交到github:

$ git add .
$ git commit -m "initial commit"
$ git push origin master

几分钟后浏览http://yinwer81.github.com即可。

若失败,邮件或仓库的Setting页面(右边Setting链接)Github Pages段落有提示信息,同时需注意是否有CNAME设置。

如何在本地调试预览github pages,请参考下篇blogging with github pages part2

就酱,您有任何问题或建议,请给我写邮件


Yinwer /
Published under (CC) BY-NC-SA