4 ms·
It probably depeds on the kind of software you create, but in our case: When i add non-trivial code I want others of my team to review it first. When it is on
by stpedgwdgfhgdd 1y ago
It probably depeds on the kind of software you create, but in our case:
When i add non-trivial code I want others of my team to review it first. When it is on trunk, it gets less easier to refactor as others already might use it. In this sense using a MR is really good way to get some quality checks before it goes to main and needs to be supported (in most cases) indefinitely. Next, we have system tests that i really want to avoid breaking on main and getting EVERYONE stuck.
The problem arises if I keep that branch for more than a week. Merge conflicts get harder, the financial investment is not leveraged, etc etc.
The problem is with long lived branches. This is something you should avoid, you can take it to the extreme, no branches. But extreme is almost never good.
PS CC is really good at rebasing and resolving merge conflicts.
- _kidlike 1y agoI think the article misunderstood the debate... the debate is (or at least was) about gitflow, and specifically about having git branches per environment. So there are git branches for dev, staging, etc, all the way to prod. And git changes become deployed on the respective branch. Trunk based development is about having a single master (sorry, "main"), and generating deployable artifacts from there, and then the remaining environments have only deployments of versioned artifacts. Unless I'm missing some new debate about the value of PullRequests, but that sounds extreme.