Switch Git branch without files checkout

前端 未结 11 1462
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-29 15:36

Is it possible in Git to switch to another branch without checking out all files?

After switching branch I need to delete all files, regenerate them, commit and swit

11条回答
  •  星月不相逢
    2020-11-29 16:31

    Wouldn't be a better solution to have two working directories (two working areas) with one repository, or even two repositories?

    There is git-new-workdir tool in contrib/ section to help you with this.

提交回复
热议问题