patterngitMinor
How long is it appropriate to keep old feature branches in git?
Viewed 0 times
brancheskeeplongappropriategithowoldfeature
Problem
I am on a large team with many developers. We have a large codebase that has many feature branches from our large group of developers. We are accumulating many feature branches.
We generally look to git-flow for best practices.
How long should feature branches last?
Is it safe enough and not costly or degrading to performance to keep all of them?
Are there considerations and maintenance commands that developers need to execute every so often to have working, efficient, and responsive git ?
Thanks.
We generally look to git-flow for best practices.
How long should feature branches last?
Is it safe enough and not costly or degrading to performance to keep all of them?
Are there considerations and maintenance commands that developers need to execute every so often to have working, efficient, and responsive git ?
Thanks.
Solution
Feature branches should stay until the feature is done, once done the branch must be closed/deleted. Establishing this kind of behavior should be a team goal and usually takes some time, it's just easier to forget about them in the hurry up I'm ready with my pull request mode.
Keeping all of them makes maintainability harder. You might think that each branch follows a naming convention with a map to a JIRA ticket or whatever kind of mapping you have and it's really straight forward to distinguish them, but that's not the case once you have a dozen of them and even more are constantly piling up. I highly doubt performance has anything to do, it's more like a confusion cost switch.
Regarding the commands, I do not think so.
Keeping all of them makes maintainability harder. You might think that each branch follows a naming convention with a map to a JIRA ticket or whatever kind of mapping you have and it's really straight forward to distinguish them, but that's not the case once you have a dozen of them and even more are constantly piling up. I highly doubt performance has anything to do, it's more like a confusion cost switch.
Regarding the commands, I do not think so.
Context
StackExchange DevOps Q#11232, answer score: 5
Revisions (0)
No revisions yet.