git: put a branch in a subdirectory

后端 未结 6 1387
北恋
北恋 2021-02-04 00:35

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

6条回答
  •  清酒与你
    2021-02-04 01:18

    Branches in git are pointers to commits (that move), and so having a branch as a subdirectory is not possible.

    To be fair, git co gh-pages is not much harder than cd ../gh-pages

提交回复
热议问题