User Tools

Site Tools


Commit & Branch Conventions


Usage of bug / feature branches

When starting to work on a new ticket, a branch for this ticket should be created. Usually the base of this branch is the head of the master-branch. The new branch should follow the naming conventions described below:

  • for a feature-branch, that implements a feature-request use: feature-<ticket-number>
  • for a bug-branch, that fixes a bug use: bug-<ticket-number>

Example: The branch which is created for a ticket #42 in the bug tracker should be named bug-42.

This helps to quickly relate a branch to the respecting ticket and makes it easier to find a suitable name for a branch.

Fixing multiple bugs / Implementing multiple features in a single branch

Avoid the fixing of multiple bugs or the implementation of multiple features in a single branch. This allows separate reviews and the independent integration of each bug/feature. However, during the work on a certain bug / feature, it sometimes happens that a new bug is detected that needs to be fixed on the way or several bugs are related to each other and cannot be solved independently. In such a situation it is necessary to commit changes relating to different bugs / feature requests into the same branch. In the second case it might be good decision to create a tracking bug that reference all related bugs for proper branch naming.

When detecting new bugs on the way: always create a new ticket! (even when it is already solved by some commit) (see Bug & Feature Tracker for more details).


  • Feature / bug branches are only merged after the related ticked review is finished.
  • Feature / bug branches are merged back to master with the git option --no-ff, for better readability of the merger history.



Commit often in small packages. Do not bundle different concerns in a single commit. That makes it easier to revert changes if necessary.

Referencing the relating bug

Additional to the branch naming convention, related bug should be referenced in each commit message associated with them.

  • For bugs use BR <ticket-number>
  • For features use FR <ticket-number>

Example: The message of a commit that fixes bug #42 would look like this:


<some descriptive text>
Fixes BR 42
commits.txt · Last modified: 2017/03/02 13:58 by nlskrg