Rename git branches with proper naming conventions and update remote tracking
/plugin marketplace add claudeforge/marketplace/plugin install update-branch-name@claudeforge-marketplaceRename git branches following naming conventions and automatically update remote tracking.
Run on the branch you want to rename:
/update-branch-name
The command will suggest names based on your changes.
Feature Development
feature/user-profile-editor
feature/csv-export
feature/oauth-login
Bug Fixes
fix/validation-error
fix/memory-leak
fix/null-pointer
Refactoring
refactor/extract-utils
refactor/database-layer
refactor/api-structure
Documentation
docs/api-documentation
docs/setup-guide
docs/contributing
1. Check Current Branch
git branch --show-current
# Output: temp-branch
2. Analyze Changes
git diff main...HEAD
# Review what you've changed
3. Rename Locally
git branch -m temp-branch feature/user-authentication
4. Update Remote
# Delete old remote branch
git push origin --delete temp-branch
# Push new branch and set upstream
git push -u origin feature/user-authentication
Scenario: Working on search feature, branch named "test"
Step 1: Analyze Changes
git log main..HEAD --oneline
# Shows commits related to search functionality
Step 2: Choose New Name
Based on changes: feature/fuzzy-search
Step 3: Rename
git branch -m test feature/fuzzy-search
Step 4: Update Remote
git push origin --delete test
git push -u origin feature/fuzzy-search
Type Prefixes
feature/: New features or functionalityfix/: Bug fixeshotfix/: Critical production fixesrefactor/: Code restructuringdocs/: Documentation changestest/: Test additions or updateschore/: Build/config changesWith Issue Numbers
feature/123-user-dashboard
fix/456-login-error
docs/789-api-guide
Team Member Prefix
alice/feature/search
bob/fix/validation
Before renaming:
Temporary Name to Descriptive
# From: temp, test, branch1
# To: feature/shopping-cart
git branch -m temp feature/shopping-cart
Fix Type After Work Changes
# Started as feature, became refactor
# From: feature/update-api
# To: refactor/api-structure
git branch -m feature/update-api refactor/api-structure
Add Issue Number
# From: feature/notifications
# To: feature/234-notifications
git branch -m feature/notifications feature/234-notifications
After renaming, verify:
# Check local branch
git branch --show-current
# Check remote tracking
git branch -vv
# Verify remote branch exists
git ls-remote --heads origin
Branch Already Exists: Choose a different name
Push Denied: Check permissions, might need force push
Lost Tracking: Reset with git branch --set-upstream-to=origin/new-name
Protected Branch: Cannot rename main/master/develop
Rename multiple branches:
# List all branches
git branch
# Rename each one
git branch -m old-name-1 new-name-1
git branch -m old-name-2 new-name-2
Before PR Creation: Rename to descriptive name
After PR Created: Avoid renaming (causes confusion)
PR Already Open: Update PR title/description instead
When renaming shared branches:
A good branch name: