Committing documentation to a git branch (gh-pages)
问题 I have generated documentation from javadoc in a /docs directory in the working directory of my git project. I would like to make this documentation available at github.io by committing it to the gh-pages branch of my repository (this will make it automatically available at http://username.github.io/projectname ). Not sure how to go about it, though. If I switch to gh-pages by using git checkout , all the contents of my working directory will be switched to the contents of the gh-pages ,