Recommended Free Tools
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Git’s rerere feature can remember a manual merge-conflict resolution and apply it when a matching conflict appears again. Enable it with rerere.enabled, then inspect the reused change before staging it: by default, rerere updates the working tree but leaves the index alone.
What Git rerere remembers—and when it helps
rerere stands for “reuse recorded resolution.” During a conflicted merge, Git records the conflict and, after you resolve it, the corresponding manual fix. If a matching conflict occurs later, Git tries to reuse that fix. The feature is especially useful on long-lived topic branches where repeated testing or later integration can produce the same conflict again. Git’s rerere manual
It does not decide whether an old fix is still correct for the code’s current meaning. Treat a reused resolution as a proposed change, not approval to commit.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Enable rerere
To enable conflict recording for all repositories belonging to your user account, run:
#1 Best Overall
git config --global rerere.enabled true
To enable it only in the current repository, omit --global:
git config rerere.enabled true
Once enabled, Git invokes rerere during merge and rebase workflows. It records a resolution after you resolve the conflict; it cannot learn a useful fix until you have resolved one manually.
Review and stage a reused resolution
By default, rerere writes a cleanly reused resolution to the working tree but does not update the index. Review the change, then stage the path only if the result is correct:
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchRank #2
-
Check which paths have resolutions rerere will record with
git rerere status. -
See conflicts that rerere did not resolve with
git rerere remaining. -
Inspect resolution changes with
git rerere diff. -
Review the working-tree change with
git diffor, where useful for a conflicted merge,git diff -c. -
After confirming the fix, stage the appropriate path, for example
git add path/to/file.Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsSpecial offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Git documents rerere.autoUpdate as false by default. If you explicitly set it to true, rerere updates the index after a clean reuse:
git config rerere.autoUpdate true
Automatic index updates remove the manual staging step, not the need to inspect the result. Git configuration reference
How reuse works
On the initial conflict, Git records the conflicted automerge, including its conflict markers. Once you resolve it, Git records the result. On a later matching conflict, rerere performs a three-way merge using the original conflicted automerge, your recorded resolution, and the current conflicted automerge. If that merge is clean, it writes the result into the working tree. Git rerere manual
Git normalizes conflict markers and hunk order when calculating a conflict ID. That helps it match conflicts even when labels, conflict style, or merge order have changed. Git rerere technical documentation
Forget or clear recorded resolutions
If a saved resolution is no longer appropriate for a current conflict, forget it for the matching path or paths:
Best Value
git rerere forget path/to/file
Use git rerere clear to reset rerere metadata when abandoning a merge resolution. Git’s git am and git rebase skip or abort flows invoke this cleanup automatically. Git rerere manual
Retention and limitations
When git rerere gc runs, Git’s documented defaults retain unresolved conflict records for 15 days and resolved records for 60 days. The periods are configurable through gc.rerereUnresolved and gc.rerereResolved; they describe retention after garbage collection, not a promise that every record disappears on an exact schedule. Git configuration reference
-
Conflict markers matter. Rerere relies on marker lines to identify conflicts. File content that already resembles those markers can interfere with recording; Git points to the
conflict-marker-sizegitattributes setting as a workaround.Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
Some conflict types are unsupported. Git gives conflicting submodules as an example of conflicts rerere cannot autoresolve.
-
A matching conflict may have different intent. Even when Git can reuse the textual resolution, changes around it may make the old fix wrong. Inspect the final diff before staging or committing. Git rerere manual
Quick Recap
Bestseller No. 1Bestseller No. 4
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

