How should you name your branches on Git?

NicolasBrondinBernard

Author
@NicolasBrondinBernard

People who write incomprehensible commit messages, we see you!

Article published on 06/11/2020, last updated on 10/08/2026

When you use Git to version your code and you don't enforce a standardized naming convention, you very quickly lose the very point of using a version manager.

Because after all, how can you easily find your branches when half the names look like "fix", "another-fix" or "wtf"?

Branches

I distinguish three types of branches in a project: global branches, personal branches, and task branches.

Global branches

A global branch is a branch that is managed by only a very small number of developers and that has consequences on deployments. You should never code directly in these branches, all code must come from merge requests that have undergone a code review beforehand.

These branches are generally called: master, preprod, dev, ...

Personal branches

These branches are the main branches on which developers work autonomously on their respective sprint for the current dev version.

These branches are therefore all named: dev/[firstname], dev/[initials] or even dev/[firstname lastname].

Task branches

Sometimes one or more devs have to work on a task that falls outside their current workflow, say a bug fix on the current version, while their sprint is focused on the next version of the application.

So we create a branch specific to this task, based on the desired global branch, taking care to prefix the branch name with the type of task to be performed, for example:

  • fix/user-signup
  • doc/missing-route
  • ux/onboarding-improvement

Careful, to keep a clean repository, the ideal is to delete each task branch once it has been merged with a global branch.

If you're interested in naming conventions for commits, go read our dedicated article: https://code-garage.fr/blog/comment-bien-ecrire-vos-messages-de-commit


Matthew Smith sur Unsplash

Finished reading this article?
Our complete courses
Take it to the next level with our courses!

Complete courses, exercises and certificates to really learn programming!

4.8 average rating

Comments (0)

to leave a comment

No comments yet