Removing Branches
After certain milestones, it is important to remove branches to keep the repository "clean" and to avoid consuming infrastructure resources unnecessarily. This also reduces the risk of errors, such as selecting the wrong target in a merge or choosing the wrong source when creating new branches.
Follow the standards below depending on the versioning approach on your project.
Since the client may request at the last minute to exclude a feature from a release, branches are deleted after a certain period of time. Follow these removal standards depending on the type of branch you need to delete:
Main branches should never be deleted.
Remove the hotfix branches once the release including the hotfix was delivered to QA.
Remove feature branches once the release containing them has been certified by the client's QA team (e.g. the bank) or once it has gone into production.
Remove release branches once a new release has been put into production, i.e. when it is no longer productive.
Main and develop branches should never be deleted.
Remove the hotfix branches once the release including the hotfix was delivered to QA.
Delete release branches once a new release has been put into production, i.e. when it is no longer productive.