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 branches every time.
repo/
(content of the master branch)
gh-pages/
(content of the gh-pages branch)
Is that possible ?
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…
and then another clone that’s on the other branch