What is the proper way to set up nikola with github?
I serve my website out of a github repo in a gh-pages branch. I deploy to that branch using the "nikola github_deploy" command.
The two branches in one repo are "master" and 'gh-pages". I would like to be able to commit my source files to the master branch and the generated website to the gh-pages branch.
Unfortunately every time I commit to one branch I can't commit to the other one without cloning the whole repo to a new local copy and committing from there. It keeps rejecting my commits or deploy attempts:
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
But I never commit from any other machine than this one. I don't know why it keeps saying that.
Part of the problem might be that I started hosting on github long after starting a github repo for the source, so the gh-pages branch was added later and probably not done correctly. I also don't know git so well.
Is this something I can fix easily? Or should I start over with a clean repo? The git history isn't important to me, so which ever is easier.
If it helps, my current git history looks like:
$ git log --oneline --decorate --graph --all
* 1f3d6b5 (ssh-origin/gh-pages, gh-pages) Nikola auto commit.
* 5fd9e05 (origin/gh-pages) Nikola auto commit.
* 8bd6301 Nikola auto commit.
* 98124aa Nikola auto commit.
* a62755e Nikola auto commit.
* c7040cf Nikola auto commit.
* 0c25422 Nikola auto commit.
* 2f594f6 Nikola auto commit.
* 8747b77 Nikola auto commit.
* 9e90a42 Nikola auto commit.
| * f983430 (HEAD -> master, origin/master, origin/HEAD) https => http
| * 3092af4 new post and theme
| * 46aa861 gnossienne 4
| * 7138644 another-lamp
...
Thanks!
-Jim