Skip to main content
danger

This section presets one view of git branching. There are others.
Branches are also a subject in the course Agile Team Coding. (Spoiler alert! The message will be: Don't!)

How to Structure your Branches

A simple way to structure your Git Projects when working in teams is to have your standart Master branch, a develop branch and feature branches.

Master Branch

Your Master branch is the main branch you have when creating a Project. This branch tends to have a working and tested version of the programm.

info

Historically, the term "master" branch is common, but for some time now there has been a trend towards calling the main branch of a repository "main". GitLab and GitHub now create the "main" branch instead of the "master" branch by default.

Development (Dev) Branch

A Dev Branch is created to have a working branch. This is where changes are made and feature branches are merged onto. Only if the current version of the program is tested and working properly, it is merged onto the Master branch.

Feature Branches

Freature Branches are created to work on a specific feature of a programm. For example implementing a saving button. For each new Feature that is implemented a new Feature branch is created. When working in teams on a project Feature branches can be created for each different feature that is being implemented to avoid merge conflicts. Since everyone would be working on their own version of the program and not everyone on one version that is constantly changed- The Feature Branch is always created from the Dev branch and then also merged back into it.