The conflict that comes back
Suppose you merge an updated branch into your topic branch to check how the changes fit together. Both branches changed the same part of a file, so you resolve a conflict by hand. Later, you rebase the topic branch and meet that conflict again. Git’s rerere manual describes this sequence: a resolution from the earlier merge can help with the conflict during the rebase.
rerere stands for reuse recorded resolution. It records a conflicted file and the version you produce after resolving it. When a corresponding conflict appears again, Git uses the earlier conflict and resolution to attempt a three-way merge. If that merge succeeds, it writes the result to the working tree. Reuse depends on the recorded resolution still applying to the new conflict. Git’s manual explains both the reuse and that limit.
Check the reused result
A file changed by rerere still needs your attention. By default, rerere leaves the index alone. Git’s manual says to inspect the result with git diff, then run git add when you are satisfied. The rerere.autoUpdate setting can change whether a cleanly reused result updates the index, so checking the file remains a useful step.
Some conflicts still need a manual resolution. git rerere remaining lists paths it has not resolved automatically, including conflicts it cannot track, such as conflicting submodules. git rerere diff shows changes made while resolving a conflict. These commands are documented in the rerere manual.
What to do
- Before the next conflict, enable recording in the repository with
git config rerere.enabled true. Therereremanual requires the setting, andgit configdocuments what it activates. - Resolve a conflict as usual. When a corresponding conflict returns during a rebase, inspect any reused result with
git diff. Usegit rerere remainingto find paths that still need work. Git’srereremanual describes these checks. - Edit anything that needs correction, run
git addfor each resolved file, then rungit rebase --continue. Therebasemanual gives that sequence for continuing after a conflict.

The Campfire
No commentsNobody has pulled up a log by this one yet. Be the first to say what you make of it.
Held for the desk. It appears after a look.