【发布时间】:2014-12-16 00:40:06
【问题描述】:
我已经在我的 github 帐户上设置了 Octopress。我有3个分支;源,主,gh-pages。当我添加新的博客文章时,会在本地生成,但不会在我的 github 帐户的 gh-pages 分支上更新。我试图提交,推入 gh-pages 分支,但我得到“没有提交,工作目录干净”的消息。
【问题讨论】:
标签: github branch jekyll octopress
我已经在我的 github 帐户上设置了 Octopress。我有3个分支;源,主,gh-pages。当我添加新的博客文章时,会在本地生成,但不会在我的 github 帐户的 gh-pages 分支上更新。我试图提交,推入 gh-pages 分支,但我得到“没有提交,工作目录干净”的消息。
【问题讨论】:
标签: github branch jekyll octopress
编辑:我看了你的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
source 设为默认分支并删除 master
【讨论】: