Should I delete a branch after merging it?

后端 未结 4 1918
失恋的感觉
失恋的感觉 2020-12-24 11:13

After merging a branch, do you delete it from the repository?
However, it\'s a good practice or not?

I usually create a lot of branches, since I don\'t want to

4条回答
  •  再見小時候
    2020-12-24 12:08

    Just to clarify, branch, from git point of view, is just link onto some commit. By deleting branch, you will not delete commits from git repo. Of course, detached commits will be cleaned after some time via git garbage collector.

    FYI: We're usually merging branches into master via bitbucket interface. There you can set delete feature branch after merge flag.

    If you need to deal with too old branches, you could have a look for some utilities, for example this one .

提交回复
热议问题