We all know it: When software projects start small, emphasis is initially placed on rapid progress in development. During the development, individual project-organizational processes may remain undefined - such as the branching strategy in Git. If a project then continues to grow without a suitable procedure being found, chaos can be the result.

Want an example?

Let´s imagine working as a developer in a big multi-repository software project, including multiple development teams, without having a clear branching model.

So where does chaos start? With confusion:

You want to work on a bugticket. Nobody communicated or documented from where to branch off, where your work has to be merged and which merge strategy to use.

"Easy one", you think "Just ask a senior developer". But if nothing is clearly defined, he will only tell you his way of branching and merging. You will get completely different answers from other developers. Confusion? Definetly.

It is also easier to make mistakes. If only one person knows, if your bugfix has to be merged to the current release-candidate or also to older ones, it may get lost if he or she is not paying proper attention. There is also a huge communication overhead for always asking the person in charge.

How to solve this

Invite developers, especially senior developers to concepually create a model for a proper branching strategy and let them present and discuss it with other senior developers. If it survives the criticism of the team, you may have found a good strategy suiting your projects´ needs 😜

Also consider establishing the selection of a branching model as an essential part of future projects.

Tip: Gitflow can be a good reference to work out your own strategy 🔀

Happy Branching!