Github offers Github Pages that let you host web pages on Github.
You create these by adding a branch to git called
gh-pages, and this is often in addition to the default branch
I just needed the
gh-pages branch. So thanks to YJL, here’s the simplest way to do it.
- Create the repositoryon github.
- Create your local repository and
git commitinto it.
git push -u origin master:gh-pages
.git/config, under the
[remote "origin"]section, add
push = +refs/heads/master:refs/heads/gh-pages
The magic is the last :gh-pages.