我已经在github帐户上设置了Octopress。我有3个分支;来源,母版,gh页面。当我添加一篇新的博客文章时,会在本地生成,但不会在我的github帐户的gh页面分支上更新。我尝试过提交,推送到gh页面分支,但我收到了"无需提交,正在清理工作目录"的消息。
编辑:我查看了您的Rakefile:deploy_branch = "master"
必须是deploy_branch = "gh-pages"
。
让我们解决这个问题
# go to site root
cd /your/folder
# be sure to be on the source branch
git checkout source
# make a backup (Shit happens)
cp -rp . ../save.alperunal
# remove the gh-pages branch on github
git push origin --delete gh-pages
# setup the deploy folder on gh-pages
rake setup_github_pages[git@github.com:jspduke/www.alperunal.com.git]
# deploy your code
rake gen_deploy
很好,您现在正在推进gh-pages
。现在一切都很好,你可以:
- 删除备份
rm -rf ../save.alperunal
- 转到github,将
source
设为默认分支并删除master