Octopress部署到gh-pages

时间:2013-07-19 04:43:36

标签: git bitbucket jekyll octopress github-pages

我创建了一个username.github.io回购,我将当前的Octopress博客文件推送到master分支,以便跟踪我对整个博客所做的更改。

接下来,我希望它显示在gh-pages分支中,因此我使用rake setup_github_pages,然后使用rake generaterake deploy[gh-pages],但git拒绝了它,并显示以下消息:

To https://github.com/username/username.github.io
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/username/username.github.io'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

## Github Pages deploy complete
cd -

我该如何解决这个问题?我只想将_deploy文件夹放在gh-pages中,其余文件夹放在master分支中。

这甚至可能吗?

1 个答案:

答案 0 :(得分:2)

感谢NiceCabbage的Tomoya Hirano,我终于找到了解决方案。

在他的Octopress and gh-pages post中,他提到使用BitBucket作为实际Octopress源代码的存储库而不是使用GitHub。

我发现这个解决方案非常方便,因为我的Octopress博客的GitHub回购现在包含_deploy文件夹,而其余文件夹在BitBucket中。这真的不是确切的答案,但是这个解决方法解决了_deploy和其他人在Interwebz安全的地方上传的问题。

希望这有助于某人!

相关问题