From fb173f93983092f561504578dc41ea474c18513c Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Sun, 22 Feb 2026 16:41:43 -0600 Subject: [PATCH] store: Rebase feature branch onto next-release before PR to avoid merge conflicts --- ...ext-release-before-pr-to-avoid-m-c02390.md | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 graph/procedures/rebase-feature-branch-onto-next-release-before-pr-to-avoid-m-c02390.md diff --git a/graph/procedures/rebase-feature-branch-onto-next-release-before-pr-to-avoid-m-c02390.md b/graph/procedures/rebase-feature-branch-onto-next-release-before-pr-to-avoid-m-c02390.md new file mode 100644 index 00000000000..a92f622a259 --- /dev/null +++ b/graph/procedures/rebase-feature-branch-onto-next-release-before-pr-to-avoid-m-c02390.md @@ -0,0 +1,44 @@ +--- +id: c0239088-398b-4f72-9894-3caa2e385833 +type: procedure +title: "Rebase feature branch onto next-release before PR to avoid merge conflicts" +tags: [major-domo, git-workflow, next-release, rebase, discord-bot, procedure] +importance: 0.6 +confidence: 0.8 +created: "2026-02-22T22:41:43.343387+00:00" +updated: "2026-02-22T22:41:43.343387+00:00" +--- + +# Rebase Feature Branch onto next-release Before PR + +## Project +major-domo / discord-app-v2 (applies to all major-domo services) + +## Context +The `next-release` staging branch accumulates changes from multiple PRs (security fixes, unused import cleanup, scorebug fixes, etc.) before being merged to `main`. Feature branches based off `main` can conflict with `next-release`. + +## Procedure + +```bash +# 1. Fetch latest remote state +git fetch origin + +# 2. Rebase feature branch onto next-release +git rebase origin/next-release + +# 3. Resolve any conflicts, then continue +git rebase --continue + +# 4. Force-push to update the PR branch +git push --force-with-lease origin +``` + +## Common Conflicts in This Repo +- Unused import cleanup PRs may remove imports that your branch re-introduces — add the import back after resolving +- Security fix PRs may have changed `except:` to `except Exception:` — accept theirs or merge carefully +- `tasks/transaction_freeze.py` is a frequent conflict hotspot + +## Notes +- Use `--force-with-lease` (not `--force`) — safer, refuses to push if remote has unexpected commits +- After merging `next-release` → `main`, sync local main: `git reset --hard origin/main` if it has diverged from rebased commits +- If an import was removed as "unused" by a previous PR but your changes re-introduce usage, add it back explicitly — don't assume the cleanup branch was authoritative