[英]Octopress deployment to gh-pages
我創建了一個username.github.io
庫,並將當前的Octopress博客文件推送到master
分支中,以便可以跟蹤對整個博客所做的更改。
接下來,我希望它出現在gh-pages
分支中,所以我使用了rake setup_github_pages
,然后使用rake generate
和rake 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
分支中。
這有可能嗎?
我終於找到了解決方案,這要感謝NiceCabbage的 Tomoya Hirano。
在他的Octopress和gh-pages帖子中,他提到使用BitBucket作為實際Octopress源代碼的存儲庫,而不是使用GitHub。
我發現此解決方案非常方便,因為我的Octopress博客的GitHub存儲庫現在包含_deploy
文件夾,而其余文件夾位於BitBucket中。 確實不是確切的答案,但是此解決方法解決了_deploy
與其余文件在_deploy
安全存儲的地方的分離。
希望這對某人有幫助!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.