I made a username.github.io
repo and I pushed my current Octopress blog files into the master
branch so that I can track the changes I made to the whole blog.
Next, I want it to appear in the gh-pages
branch so I used rake setup_github_pages
, then rake generate
and rake deploy[gh-pages]
but git rejected it with the following message:
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 -
How do I solve this? I only want to put the _deploy
folder in the gh-pages
and the rest in the master
branch.
Is this even possible?
I finally found a solution thanks to Tomoya Hirano of NiceCabbage.
In his Octopress and gh-pages post he mentioned using BitBucket as the repository for the actual Octopress source code instead of using GitHub.
I find this solution very convenient since my GitHub repo for the Octopress blog now contains the _deploy
folder while the rest is in BitBucket. It's really not the exact answer but this workaround addresses the separation of _deploy
and the rest's upload somewhere secure in the Interwebz.
Hope this helps someone!