My manager recommended I consider the technique of ‘branching by abstraction’, in which, rather than creating feature branches, multiple developers work in the same version control branch, and abstract the functionality they are working on e.g. using feature toggles.
I’m sceptical about this approach, but feel obliged to consider with at least a semblance of fairness. One of my major concerns regards code review. The developers in my team use pull requests to review each other’s code. Without branches, this approach would be unavailable.
My question is, if one were to apply this technique, how could code review be accomplished (easily)?
3
Our team uses the Gerrit code review system, where reviews are based on commits, instead of branches. The learning curve of Gerrit is higher than pull requests, but it creates a much cleaner commit history and allows for fine-grained commenting on code.
Our local repositories still contain branches, but 95% of our commits end up directly on the ‘develop’ branch.
For larger features, where considerate change in database structure or impactful refactors are necessary, we still use feature branches.