Sponsored
Ad slot is loading...

Git Branch Naming Convention

Standard git branch naming conventions for teams. Clear patterns for features, bugfixes, releases, and more. Follow best practices for clean repository.

Branch Type Patterns

feature/ - New feature development
Example: feature/user-authentication
bugfix/ - Bug fixes
Example: bugfix/login-error
hotfix/ - Urgent production fixes
Example: hotfix/security-patch
release/ - Release preparation
Example: release/v1.2.0
docs/ - Documentation changes
Example: docs/api-reference
refactor/ - Code refactoring
Example: refactor/simplify-logic
test/ - Test additions/changes
Example: test/unit-tests
chore/ - Maintenance tasks
Example: chore/update-dependencies
wip/ - Work in progress
Example: wip/new-dashboard
experiment/ - Experimental features
Example: experiment/new-algorithm

Naming Best Practices

Use lowercase letters
Separate words with hyphens
Include issue/ticket number
Keep names short and descriptive
Avoid special characters
Use consistent team conventions
Delete merged branches
Use slash for category separation

Examples with Issue Numbers

feature/issue-123-add-login
bugfix/issue-456-fix-crash
hotfix/critical-security-fix
release/v2.1.0
docs/readme-update

Workflow Integration

Create branch: git checkout -b feature/issue-123-new-feature. Work on branch, commit changes. Push: git push -u origin feature/issue-123-new-feature. Create PR/MR. Merge to main. Delete branch: git branch -d feature/issue-123-new-feature. Keep main/master clean, always branch.

Team Conventions

Document conventions in README. Use branch protection on main. Require PR reviews before merge. Auto-delete merged branches. Enforce naming with branch naming rules. CI/CD triggered by branch patterns. Consistency improves collaboration.
Sponsored
Ad slot is loading...