Skip to content

ADR: Git Branching

Status

Accepted (March 2025)

Context

We have mixed standards in terms of Git branch "folders" which leaves a messy branch structure with varying folder standards and typos. We have no standard for sub feature branching as recently agreed on in Pull Request Review Guidelines.

Previously there were no rules regarding branch structure and names.

Decision

Branch Names

Branch names:

  • MUST NOT contain upper case characters
  • MUST use - to separate between words for readability
  • MUST start with a conventional commit type keyword as mentioned in Git Commit ADR followed by a path separator / to form a git branch "folder"

Sub-Feature Branch

Sub-feature branches:

  • MUST originate from the parent [sub] feature branch
  • Names MUST start with the full feature branch name (including "folder"), followed by --, followed by its own name

Example

feature/user-authentication
  └── feature/user-authentication--oauth
  └── feature/user-authentication--2fa

Consequences

We'll keep a clear separation of branches according to intention and organized sub-features. Basically, a more organized branch structure for our repository.

Impact

Low

Driver

@Eudald Rossell Vivo

Contributors

[Team]

Accepted Date

March 2025

Resources

Last modified by: Unknown