git push -f origin master:gh-pages
Automated way:
Add the following 2 lines to the [remote "origin"] section of .git/config:
push = +refs/heads/master:refs/heads/gh-pages
push = +refs/heads/master:refs/heads/master
Now when you do:
> git push origin
It'll push to master and gh-pages :D