Phase 1b: Rename all ~94 commands across 12 plugins to /<noun> <action> sub-command pattern. Git-flow consolidated from 8→5 commands (commit variants absorbed into --push/--merge/--sync flags). Dispatch files, name: frontmatter, and cross-reference updates for all plugins. Phase 2: Design documents for 8 new plugins in docs/designs/. Phase 3: Scaffold 8 new plugins — saas-api-platform, saas-db-migrate, saas-react-platform, saas-test-pilot, data-seed, ops-release-manager, ops-deploy-pipeline, debug-mcp. Each with plugin.json, commands, agents, skills, README, and claude-md-integration. Marketplace grows from 12→20. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2.5 KiB
2.5 KiB
Merge Workflow
Purpose
Defines merge strategies, conflict resolution approaches, and post-merge cleanup procedures.
When to Use
- Merging feature branches in
/gitflow commit --merge - Resolving conflicts during sync operations
- Cleaning up after successful merges
Merge Strategies
1. Merge Commit (Default)
git merge <branch> --no-ff
- Preserves history - All commits visible
- Creates merge commit - Clear merge point
- Best for: Feature branches, team workflows
2. Squash and Merge
git merge <branch> --squash
git commit -m "feat: complete feature"
- Single commit - Clean main branch history
- Loses individual commits - Combined into one
- Best for: PR workflows, many small commits
3. Rebase
git checkout <branch>
git rebase <target>
git checkout <target>
git merge <branch> --ff-only
- Linear history - No merge commits
- Rewrites history - Changes commit hashes
- Best for: Personal branches, clean history
Standard Merge Procedure
# 1. Switch to target branch
git checkout <target>
# 2. Pull latest changes
git pull origin <target>
# 3. Merge feature branch
git merge <feature-branch> [--squash] [--no-ff]
# 4. Push merged result
git push origin <target>
Conflict Resolution
When conflicts occur:
Conflicts detected while merging.
Conflicting files:
- src/auth/login.ts
- src/auth/types.ts
Options:
1. Open conflict resolution (guided)
2. Abort merge (keep local state)
3. Accept all theirs (loses your changes in conflicts)
4. Accept all ours (ignores upstream in conflicts)
Manual Resolution Steps
- Open conflicting file
- Find conflict markers:
<<<<<<<,=======,>>>>>>> - Edit to desired state
- Remove markers
- Stage resolved file:
git add <file> - Continue:
git merge --continueorgit rebase --continue
Post-Merge Cleanup
After successful merge:
Merge complete. Delete the feature branch?
1. Yes, delete local and remote (Recommended)
2. Delete local only
3. Keep the branch
Cleanup Commands
# Delete local branch
git branch -d <branch>
# Delete remote branch
git push origin --delete <branch>
Pre-Merge Checks
Before merging:
- Verify target exists -
git branch -a | grep <target> - Check for uncommitted changes -
git status - Preview conflicts -
git merge --no-commit --no-ff <branch> - Abort preview -
git merge --abort
Related Skills
- skills/git-safety.md
- skills/sync-workflow.md