Git: should a branch (unmerged) be removed when it is no longer active?

I have some service branches in Git that were used to create emergency releases (i.e. to fix a critical production error). These branches are usually not merged back into the master, because they either contain one-time fixes or have changes that were selected from the master.

Generally, should these branches be removed in git if they are marked (during build)? Will they remove them so that those commits are lost?

+4
source share
1 answer

No commit will be lost if it is accessible from a tag or branch head.

If you checked a branch and then made another commit and then deleted the branch, the last commit will be related to garbage collection (at some point in the future you can restore it using reflog if you don't wait too long).

+2
source

Source: https://habr.com/ru/post/1480114/


All Articles