Our new year issue Magazine, is Out Now!

Grab now!
Siltawi Logo
AD
Menu
Featured story background
Technology

Best Practices for Git Branch Names

A quick guide to Git branch naming for better team collaboration. Learn how to maintain consistency in your project's structure by using clear, descriptive branch names.

Author profileby Abel Berhanu
Oct 11, 2024
2979 Views
1 min read

A quick guide to Git branch naming for better team collaboration. Learn how to maintain consistency in your project's structure by using clear, descriptive branch names that everyone can follow.

1. Feature Branches - Purpose: New features or enhancements. - Naming Convention: feature/{short-description} or feat/{short-description} - Example: feature/user-authentication, feat/payment-integration

Article illustration

2. Bugfix Branches - Purpose: Fixes for bugs in the system. - Naming Convention: bugfix/{short-description} or fix/{issue-id}-{short-description} - Example: bugfix/login-error, fix/123-broken-link

3. Hotfix Branches - Purpose: Critical fixes to production. - Naming Convention: hotfix/{short-description} - Example: hotfix/urgent-security-patch

4. Release Branches - Purpose: Prepare for a new release. - Naming Convention: release/{version-number} - Example: release/1.2.0

5. Chore or Maintenance Branches - Purpose: For non-functional changes like refactoring, updating dependencies, etc. - Naming Convention: chore/{short-description} - Example: chore/update-dependencies

6. Experiment Branches - Purpose: For testing or experimenting with new ideas. - Naming Convention: experiment/{short-description} - Example: experiment/new-ui

7. Standard for Naming - Use lowercase letters. - Use hyphens (-) to separate words. - Avoid long branch names; keep it short but descriptive. - Optionally include issue or ticket numbers if you're using a project management tool (e.g., Jira).

By following these conventions, teams can easily identify the purpose of each branch.

Abel Berhanu

Abel Berhanu

Editor & Contributor

We provide original stories, insights, tech and startup news, and analysis from Ethiopia and worldwide.

Related post
Merkato TV: From Campus Concept to Satellite Launch
Startup
The AWS Outage Explained: What Really Happened Behind the Scenes
Technology