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:
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.
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).
--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.
Additional to the branch naming convention, related bug should be referenced in each commit message associated with them.
Example: The message of a commit that fixes bug #42 would look like this:
<headline> <some descriptive text> Fixes BR 42