From 18c051df8282bc03df65c2637808fa612f40028f Mon Sep 17 00:00:00 2001 From: Sallvainian Date: Sun, 19 Oct 2025 02:22:42 -0400 Subject: [PATCH] Add backup branch cleanup to merge-upstream workflow - Added new step 9: Clean up backup branches after successful merge - Automatically deletes all backup-before-pull-* branches - Reports cleanup count in completion summary - Updated checklist with cleanup validation items - Renumbered final step from 9 to 10 --- bmad/workflows/merge-upstream/checklist.md | 14 ++++++++++- bmad/workflows/merge-upstream/instructions.md | 24 +++++++++++++++++-- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/bmad/workflows/merge-upstream/checklist.md b/bmad/workflows/merge-upstream/checklist.md index b8c03e22..78aed5c5 100644 --- a/bmad/workflows/merge-upstream/checklist.md +++ b/bmad/workflows/merge-upstream/checklist.md @@ -46,10 +46,18 @@ - [ ] Graphiti episode includes: modification preservation status - [ ] Both memory systems confirmed successful storage +## Backup Branch Cleanup + +- [ ] Backup branches identified: `git branch | grep backup-before-pull` executed +- [ ] All backup branches matching pattern backup-before-pull-\* listed +- [ ] Backup branches deleted successfully +- [ ] Deletion confirmed: `git branch` shows no backup-before-pull branches remain +- [ ] Number of cleaned up branches reported in summary + ## Completeness - [ ] Merge commit hash documented in completion summary -- [ ] Backup branch name documented for potential rollback +- [ ] Backup branches cleaned up count included in summary - [ ] Files changed statistics recorded (files, insertions, deletions) - [ ] Modification preservation status documented (preserved/manually restored) - [ ] Reference documentation location confirmed: claudedocs/installer-modification-reference.md @@ -86,6 +94,10 @@ - [ ] Issue List: +### Backup Branch Cleanup Issues + +- [ ] Issue List: + ### Completeness Issues - [ ] Issue List: diff --git a/bmad/workflows/merge-upstream/instructions.md b/bmad/workflows/merge-upstream/instructions.md index d6e31bc7..f4e80113 100644 --- a/bmad/workflows/merge-upstream/instructions.md +++ b/bmad/workflows/merge-upstream/instructions.md @@ -140,13 +140,33 @@ Reference file should include: Verify both memory systems confirm successful storage - + +List all backup branches created during merge process +Identify backup branches matching pattern: backup-before-pull-* + +Command: git branch | grep backup-before-pull + + + Display found backup branches to user + Delete all backup branches matching the pattern + Confirm deletion with git branch output + Report number of branches cleaned up + + + + Inform user that no backup branches need cleanup + + +Verify backup branches have been removed from git branch list + + + Generate comprehensive merge completion summary for {user_name} Include in summary: - Merge status (success/conflicts resolved) -- Backup branch name and location +- Backup branches cleaned up (count) - Merge commit hash - Files changed statistics - Modification preservation status (preserved/manually restored)