How to avoid the dreaded merge conflict hell?

Trunk based development

Picture source: Optimizely
  1. The branch is always ready to be delivered irrespective of the point of time.
  2. Development is fast as small features and fixes are immediately merged to the main branch
  3. Merge conflicts are very less as changes are integrated continuously.
  4. Works well for small to medium-sized teams
  1. Managing feature toggles and flags can be cumbersome
  2. All developers must have good knowledge of feature toggles, dark launches etc to collaborate well.
  3. Possibility of stepping on each other's toes.
Picture source: Optimizely
  1. Developers can work in parallel
  2. Features can be tested easily and in isolation without worrying about how it affects the entire project.
  3. Works great for the open-sourced projects where you don’t want all changes to be merged to master without proper review and testing.
  4. Works well for huge teams
  1. Feature branch if lives long enough can cause a huge amount of merge conflicts with other branches.
  2. Might slow you down initially as reviewing and merging takes time.

Stage based development model

  • dev
  • QA
  • Nightly builds
  • UAT
  • release
  • And so on

Hybrid approach

Conclusion

Personal Experience

  • Trunk based development + Stage based development
  • Feature-based development + Stage based development

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store