Git Branch Naming Convention
Information about branch naming convetion in Openproblems repository and forks.
git branch <category/reference/description-in-kebab-case>Category
A git branch should start with a category. Pick one of these: feature, bugfix, hotfix, or test.
featureis for adding, refactoring or removing a featurebugfixis for fixing a bughotfixis for changing code with a temporary solution and/or without following the usual process (usually because of an emergency)testis for experimenting outside of an issue/ticketdocis for adding, changing or removing documentation
Reference
After the category, there should be a “/” followed by the reference of the issue/ticket/task you are working on. If there’s no reference, just add no-ref. With task it is meant as benchmarking task e.g. batch_integration
Description
After the reference, there should be another “/” followed by a description which sums up the purpose of this specific branch. This description should be short and “kebab-cased”.
By default, you can use the title of the issue/ticket you are working on. Just replace any special character by “-”.
Examples
- You need to add, refactor or remove a feature:
git branch feature/issue-42/create-new-button-component - You need to fix a bug:
git branch bugfix/issue-342/button-overlap-form-on-mobile - You need to fix a bug really fast (possibly with a temporary solution):
git branch hotfix/no-ref/registration-form-not-working - You need to experiment outside of an issue/ticket:
git branch test/no-ref/refactor-components-with-atomic-design