I have a git repository (at github.com) with two branches: master and gh-pages. I would like to have the gh-pages branch in a subdirectory, so that I don\'t need to switch branc
That's not how things are designed to work. You could theoretically clone the repository within a subdirectory of your original clone and mark that directory as excluded from the higher level repository, but wouldn't it be much simpler to just check it out in a completely different directory instead of a subdirectory?
That is to say...
/repo/master/(clone on master branch)
and then another clone that's on the other branch
/repo/gh-pages/(clone on gh-pages branch)