簡體   English   中英

Octopress部署到gh頁

[英]Octopress deployment to gh-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分支中。

這有可能嗎?

我終於找到了解決方案,這要感謝NiceCabbage的 Tomoya Hirano。

在他的Octopress和gh-pages帖子中,他提到使用BitBucket作為實際Octopress源代碼的存儲庫,而不是使用GitHub。

我發現此解決方案非常方便,因為我的Octopress博客的GitHub存儲庫現在包含_deploy文件夾,而其余文件夾位於BitBucket中。 確實不是確切的答案,但是此解決方法解決了_deploy與其余文件在_deploy安全存儲的地方的分離。

希望這對某人有幫助!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM