Finish a branch by merging it following the configured flow rules
Merges a branch to its target(s) following configured flow rules and cleans up.
/plugin marketplace add C0ntr0lledCha0s/claude-code-plugin-automations/plugin install github-workflows@claude-code-plugin-automations[branch-name]Complete a branch by merging it to the appropriate target(s) following the configured flow.
/branch-finish # Finish current branch
/branch-finish feature/auth # Finish specific branch
When this command is invoked:
Identify branch: Determine which branch to finish (current or specified)
Validate branch type: Ensure it's a recognized flow branch
Load configuration: Get flow rules for this branch type
Invoke managing-branches skill: Get branching expertise
Check preconditions:
Determine targets: Get merge target(s) from flow config
Execute merges: For each target branch:
Create tag (if configured): For releases/hotfixes
Clean up:
Update tracking:
Finish current feature branch:
/branch-finish
# Merges to develop, deletes branch
Finish specific branch:
/branch-finish feature/issue-42-auth
# Merges to develop, deletes branch
Finish hotfix (multiple targets):
/branch-finish hotfix/security-patch
# Merges to main AND develop
# Creates tag v1.0.1
# Deletes branch
Finish release:
/branch-finish release/2.0.0
# Merges to main AND develop
# Creates tag v2.0.0
# Deletes branch
Finishing feature branch: feature/issue-42-auth
Target(s): develop
Checking working directory... clean
Updating develop from origin... done
Merging to develop...
✅ Merged to develop
Pushing develop to origin...
✅ Pushed
Deleting branch: feature/issue-42-auth
✅ Deleted local branch
✅ Deleted remote branch
✅ Branch feature/issue-42-auth completed!
developdevelopmain AND developmain AND developConfigured per branch type:
--no-ff): Preserves branch history (default)For hotfix and release branches, version is determined by:
release/2.0.0 or hotfix/1.0.1)Follows semantic versioning: MAJOR.MINOR.PATCH
Before finishing a branch:
Working directory must be clean
Branch should be pushed
Code should be reviewed
If working directory is dirty:
If merge conflicts:
If branch not recognized:
If target branch doesn't exist:
--no-ff by default to preserve historyCloses #N in merge commitsUse this to properly complete branches following your team's workflow!