Git - How do I manage built files in different branches?

后端 未结 5 607
滥情空心
滥情空心 2021-01-07 23:21

Some Background

I have been using Git for a while now. The projects that I have been working on have not been too complicated in regards to branches/tags.

5条回答
  •  生来不讨喜
    2021-01-08 00:02

    Have you thought about worktrees?

    $ git worktree add ../branch2 branch2
    

    This will create a working tree checkout out to branch2

    $ cd ../branch2
    $ git branch
    * branch2
    

    You only have 1 local repo, but 2 different working areas, one for master and the other for branch2.

    That way you can keep the object files separate as well.

提交回复
热议问题