4 ms·
I couldn't disagree more with what they say about feature branches. > merging the feature branch with the main branch takes a lot of time Why would that be th
by x3n0ph3n3 4y ago
I couldn't disagree more with what they say about feature branches.
> merging the feature branch with the main branch takes a lot of time
Why would that be the case? `git merge` is not a slow and expensive process. Is the problem the per-branch code review process that teams often engage in? They didn't even discuss how code is reviewed (feature demos are not code reviews).
> when the feature is done, merging branches back might lead to new bugs and instability
Feature branches should regularly be pulling in changes from the main branch. This seems like it would be a problem whenever your local main gets behind the upstream main, either way. Lots of teams will squash changes before merging feature branches, and run the test suite on it before it's merged.
> it is more difficult to do incremental refactoring
Smaller PRs and feature branches.
There have been a few posts lately espousing the removal of workflows that have evolved over time to solve real problems in development practices. To me, it seems like a lot of cowboy coders not wanting to be constrained by sustainable development methodologies.
- P5fRxh5kUvp2th 4y agoI've seen feature branches attacked a lot and the common refrain is always the same. They live for weeks and then are hard to merge back in. This is why you should be merging main back into your feature branch daily, so imo this is just a strawman. That's assuming it's not reasonable to have smaller features. Sometimes it's not. You should strive for feature branches that live for a day or two, but if you MUST have it longer, just merge back in.