reference git merge tree dry run rebase check 20260715T214425
git merge-tree (modern form: git merge-tree --write-tree <base> <ours> <theirs>, or with an explicit --merge-base=<sha>) performs a real three-way merge simulation and reports actual conflict hunks, entirely as plumbing: no working-tree changes, no branch mutation, safe to run against main or any other branch at any time.
Why: Used this session to assess rebase risk for two long-lived CreatorTrack feature branches against a main that had drifted 67 commits, before committing to an actual rebase. It gave file-level, hunk-level conflict detail (mechanical vs needs-care vs needs-human-judgment) purely from inspection, which is exactly the confidence needed before deciding whether to rebase now or wait.
How to apply: Reach for this whenever a branch has been open a while and you need to know "how bad will the rebase be" before actually doing it, especially when deciding whether to rebase immediately or wait for upstream to settle. Prefer this over eyeballing diffs or guessing from commit summaries.
[auto-memory session 60d132de-4659-485c-8044-427af0ccce7f, confidence 0.68, mode staged]