Finish Branch
Complete the current git-flow branch.
Usage
text
/gitmastery:finish # Auto-detect branch type /gitmastery:finish --tag # For release/hotfix with tag
Workflow
1. Detect Context
bash
git branch --show-current git status --short
2. Execute Based on Type
Feature/Bugfix:
bash
git flow finish # Merges to develop, deletes branch
Release/Hotfix:
bash
git flow finish --tag -m "v<version> - Release notes"
3. Push Changes
bash
git push origin develop git push origin main --tags # For release/hotfix
Branch Actions
| Branch Type | Finish Action |
|---|---|
| feature/* | Merge to develop |
| bugfix/* | Merge to develop |
| release/* | Merge to main + develop, create tag |
| hotfix/* | Merge to main + develop, create tag |
Pre-finish Checklist
Present via AskUserQuestion:
- • All tests pass
- • Changelog updated
- • No uncommitted changes
- • Ready to merge
Conflict Resolution
If conflicts occur:
- •Resolve manually
- •
git add <resolved-files> - •
git flow finish(retry)