Should I keep feature branches or delete them after merging them into release?

My git workflow looks like this:

1. make new feature branch from branch release.
2. developing on it, after finish it, merge it into branch testing
3. Do test with code of branch testing
4. If test passed, merge new feature branch into branch release.

      

But I am getting confused, should I delete this new feature branch after merging it into release? Why?

+3


source to share


1 answer


Since you know the solution here is based on preference, I'll share with you.

Delete the branch because:

  • Affiliates Don't Tell Your Dev Story, Pull Requests do
  • It gives you a clearer picture of your development status.
  • Old branches inevitably become obsolete old branches which you will have to clean up later for 1 and 2


I appreciate how the Atlassian Git Tutorial explains it:

Once the release is ready to ship, Mary merges it to master and then delete the release branch. It's important to put it back together while critical updates can be added to the release and should be available for new features. Once again, if the Marys organization emphasizes code review, this would be the perfect place to request a stretch.

Whether you subscribe to Git Workflow or another methodology, I am standing by deleting the branch.

+3


source







All Articles