DEV Community

Discussion on: why branching on git is wrong

Collapse
 
kwiesmueller profile image
Kevin Wiesmüller

You are trying to solve an organizational problem with a technical solution.

From reading all your responses it seems like your team(s) really need some consulting and discipline.
We work with with feature branching on so many different projects and while our ci is a cornerstone for all this, it wouldn't work without branching.

Imagine a project with 5-10 people working on it, committing an average of 150+ commits a day in total.
This would cause mayhem inside the repo and using no branching there would be no way of doing code reviews.

Code Review is key and without it I wouldn't dare to bring code onto master.
You complain about devs doing changes that are on wanted by the entire team, well you need reviews man.

Nothing gets on master when a) the ci is unhappy and b) somebody asks a change.
Every team member has sort of a veto right. If somebody denies a PR there need to be changes, sync and a consensus. In the end we all are a team and a team has to collectively own it's code and should as such avoid technical debt.

Feature Toggles are great, we use them for release trains, but they are no replacement for a well established workflow.
If you don't trust your team, there is no technical solution that can help you.
No matter what managers ask and what people want, quality is not negotiable.
Don't sacrifice this because there are people in the team not willing to deliver a shared level of quality.
Before working as you suggested in your article or comments, I would rather get rid of the problematic employees or quit.

Sounds like you need a scrum master 😅

Collapse
 
kwiesmueller profile image
Kevin Wiesmüller

Oh, even better example.
Our IT does Infrastructure as Code.
Imagine no branching there.

If you have to wait for the whole infrastructure process to fail because there was no testing, review etc. you are doomed.

There are no releases, there only is master for prod and what's there is the state of infrastructure.
Not having branches would break everything all few minutes or so.