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
I've tried the git subtree trick, but it requires that master have all the gh-pages content committed to it, which is not ideal in this case. Much better and simpler is to
./repo/gh-pages/.gitignore for that (gh-pages)cd gh-pages/, git init and git checkout -b gh-pages, creating an independent git remote thereYou can also git clone directly to ./gh-pages/ with only the branch you want.