Software development is an inherently iterative process. Each iteration changes the code to make a software system do something new, improve something it already did or remove functionality that’s no longer needed. This is true for all kinds of software, from short shell scripts to codebases that have more than a million lines of code.

Branch-based development is a way of working that fits the iterative development process perfectly. Each branch starts a new iteration, each merge ends an iteration. As simple and elegant this concept sounds in theory, it unfortunately is often overcomplicated or misused in practice.

In this how-to I will show you how branch-based development is done for a small real-world application, starting from scratch.

Which branching workflow to pick?

You probably heard about different branch-based development workflows before. The most popular workflows in use today are:

If you want to get to the bottom of it, Martin Fowler wrote a very comprehensive article (Patterns for Managing Source Code Branches) that compares and evaluates these branching workflows.

In this how-to I will use a workflow that looks very similar to GitHub flow. GitHub flow is popularised by the GitHub fork-model of open-source development but it is certainly not limited to open-source projects. GitHub flow is one of the simplest and safest strategies that I’ve seen working successfully for codebases ranging from solo side-projects to systems developed by industry teams.

#github #branching #software-development #programming #git

How to do branch-based development
1.10 GEEK