From http://concord-consortium.github.io/developer-notes/automating-gh-pages-integration.html:
How to setup a git repo so gh-pages automatically tracks commits to master and ‘git push origin’ updates the remote master and gh-pages branches.
Setup a test repo:
mkdir pages-test
cd pages-test/
git init .