Skip to content

Instantly share code, notes, and snippets.

@revett
Last active December 22, 2023 17:12
Show Gist options
  • Save revett/88ee5abf5a9a097b4c88 to your computer and use it in GitHub Desktop.
Save revett/88ee5abf5a9a097b4c88 to your computer and use it in GitHub Desktop.
Git Branch Naming Conventions

Syntax

<author>/<type>/<ticket>/<title>

Example

revett/feature/24101/skeleton-service-for-email-sender

Explanation

<author>

GitHub username.

<type>

bug      - Code changes linked to a known issue
feature  - New feature
refactor - Code refactoring
spike    - Experiments 

<ticket>

Ticket/story ID.

<name>

  • Use kebab-case
  • Keep it concise
@alisonjs
Copy link

Is refactor a hotfix or feat branch?

@rw4lll
Copy link

rw4lll commented May 4, 2020

Is refactor a hotfix or feat branch?

If this code should be deployed right after it was completed, it goes to hotfix. I think it doesn't matter what inside, bug or feature.
If this code is in plan, it should be named depending on it's purpose (bug/feature/etc).

@Fresh-Dev-zunairzakir
Copy link

For the title/description dev can mention it on the pull request or the scrum master can check the details from UserStoryPBI/Bug number on DevOps.

For Example:

for PBI: PBI--DDMMYYYY(startdate)
for User Story: US--DDMMYYYY(startdate)
for Feature: Feature--DDMMYYYY(startdate)
for Bug: Bug--DDMMYYYY(startdate)
for Task: Task--DDMMYYYY(startdate)

The title is not necessary to mention in the branch name because sometimes a branch can contain multiple fixes, It's better to mention the related work on OR OR .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment