1

I've merged my code into the master branch and all is good now. Code is production ready. I want to cleanup some of the old branches as there's really no need for them. We've gone through extensive testing and are fairly certain we will not go back.

Should I delete old branches or just let it be? Branch history

shaiss
  • 2,000
  • 5
  • 22
  • 33

2 Answers2

2

You can delete old branches, especially if they are feature branches and you have completed implementing it. It is completely safe to delete old branches since all the commits have been merged onto your master.

You can do so by git branch -d branch_name

Raghav
  • 570
  • 1
  • 13
  • 24
1

If there are fully merged you can delete them with

git branch -d

with -d you can be shure that your branch is fully merged.

https://www.kernel.org/pub/software/scm/git/docs/git-branch.html

René Höhle
  • 26,716
  • 22
  • 73
  • 82