DEV Community

Discussion on: why branching on git is wrong

Collapse
 
mikenoel profile image
Michael Noël

This is not a great approach at all. Every time code is touched it should be it's own branch. This is exactly why Git mimics the structure of a tree.

Having a dev team work on the same branch can cause delays. If one developer breaks a branch it can halt development for everyone else. Unless of course, all members are at the same level of efficiency.

Having work on speperate branches allows for better code review and keeps a nice history of commits. If a developer leaves in the middle of work, another developer can pick up where they left of. They can also refer to a ticket with the same naming convention.

If the dev team has unit tests and CICD in place, they can catch the errors there.

I'm typing on my phone after a few beers. Not the best idea to comment in this state of mind.

I guess tagging could be an option as well, instead of branches.