GitHub Pages
GitHub pages are great, but they will only serve files from a branch in your git repository named gh-pages
. (I wish there was at least an option to say “Serve GitHub Pages from: [x] Master [ ] gh-pages”, but the last time I wished for something from GitHub they laughed in my face. For now I will be content that they don’t require using Jekyll to render your gh-pages
.)
Easy fix, though: s/master/gh-pages/
. Git translation follows:
git branch -m master gh-pages
# Open up .git/config and remove the [branch] section
git push -u origin gh-pages
GitHub should now have your gh-pages
branch, but it still thinks master is the primary branch. On github.com, find your repo, click “Settings” on the right bar, and change the “Default branch” dropdown to gh-pages
.
# delete the remote branch (wasn't possible when default)
git push origin :master
And that’s it!