Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Yes—Git can reuse a hand-resolved merge conflict when the same normalized conflict appears again. Enable rerere (“reuse recorded resolution”), then review the reused change: by default it updates your working tree, not the index, and it cannot tell whether your old decision is still correct for the latest code.

What Git rerere remembers

When a merge or rebase produces a conflict, Git can record both the conflicted auto-merge result and your manual resolution. If a sufficiently matching conflict appears later, rerere can apply that prior resolution. The Git project’s git-rerere manual describes this as “recording conflicted automerge results and corresponding hand resolve results on the initial manual merge, and applying previously recorded hand resolutions to their corresponding automerge results.”

A common use is a long-lived topic branch that repeatedly merges a moving upstream branch for testing. You resolve a conflict during one test merge; when that conflict recurs in a later test merge, final merge, or rebase, rerere may reuse your earlier work. Git’s Pro Git project-maintenance guide describes this recurring-merge workflow.

This is reuse based on conflict content, not an understanding of code or programmer intent. Git does not decide whether the old resolution remains appropriate after surrounding code changes.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How to enable rerere

To enable recording for your user across repositories, run:

git config --global rerere.enabled true

To limit the setting to the current repository, omit --global:

git config rerere.enabled true

Once enabled, Git’s merge and rebase conflict workflows invoke rerere. You can also run git rerere directly. The git-config documentation notes that rerere is also enabled if an rr-cache directory already exists under $GIT_DIR.

Review and stage a reused resolution

By default, a cleanly reused resolution changes the working tree but leaves the index alone. The Git project’s manual says rerere “leaves the index file alone,” so inspect the result and stage it only when satisfied.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Inspect the working-tree change:

    git diff
  2. Check for whitespace errors:

    git diff --check
  3. Review the behavior and run the project’s relevant tests. A textual conflict match is not proof that the old choice is correct for the current code.

  4. After review, stage the file or files you intend to resolve:

    git add <file>

rerere.autoUpdate controls whether a cleanly reused resolution also updates the index. Its documented default is false. Setting it to true can reduce manual staging, but makes careful inspection just as important. In git am workflows, --no-rerere-autoupdate is an available option for keeping the index untouched; see the git-am documentation.

Why a conflict can match even when the merge changes

Rerere does not simply compare entire files. It normalizes conflict content before looking for a recorded match. The rerere logic manual explains that Git strips labels from conflict markers, removes common-ancestor content for diff3 and zdiff3 styles, and sorts conflict hunks. As a result, differences such as branch labels, conflict style, or merge ordering do not necessarily prevent reuse.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a regular conflict, the manual describes the conflict ID as a SHA-1 hash of normalized hunks separated by NUL characters, with conflict markers stripped. This matching process is why rerere may reuse a resolution across different merge contexts—but it is still matching normalized conflict text, not evaluating whether a resolution makes semantic sense.

Inspect, forget, and clean up recorded resolutions

These commands help you see what rerere is handling and manage its records:

Old records are not necessarily kept forever. Run git rerere gc to prune them. The current git-rerere manual documents defaults of 15 days for unresolved records and 60 days for resolved records; gc.rerereUnresolved and gc.rerereResolved control those retention periods. These are age thresholds applied when garbage collection runs, not a promise about when it will run.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When rerere may not handle a conflict

Rerere relies on conflict-marker syntax to detect conflicts, so unusual marker content can defeat that detection. Source lines that already resemble conflict markers can interfere with recording; the Git logic manual identifies the conflict-marker-size gitattributes setting as a workaround. Unmatched conflict markers can also prevent rerere from handling a conflict. These are edge cases, not a sign that rerere understands or repairs arbitrary file changes.

Conflicting submodules are another limitation: rerere cannot track them for autoresolution. Use git rerere remaining to identify conflicts that were not reused.

Should you use rerere?

It is most useful when a long-lived branch repeatedly encounters the same normalized conflict during test merges, rebases, or final integration. For one-off and unrelated conflicts, there may be little to reuse. Choose global configuration if you want the behavior across your repositories, or repository-local configuration if you only want it in one project. Keep a recorded resolution while it remains appropriate; forget it when that stored choice is no longer valid.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.