How to fix CONFLICT (rerere): conflict not auto-resolved in Git

GitINTERMEDIATELOWUpdated Dec 6, 2025· 130 views

Git's rerere (reuse recorded resolution) feature failed to automatically apply a previously recorded conflict resolution. You need to manually resolve the conflict and let rerere learn the new resolution.

Quick fix

Fixes CONFLICT (rerere): conflict not auto-resolved

# Show files with conflicts that weren't auto-resolved
git rerere remaining

# Show the current status of rerere
git rerere status

# See all files with merge conflicts
git status
  1. Check which files have unresolved conflicts
  2. Manually resolve the conflict
  3. Let rerere record the new resolution
  4. Forget a bad recorded resolution
git — error
# Show files with conflicts that weren't auto-resolved
git rerere remaining
# Show the current status of rerere
git rerere status
# See all files with merge conflicts
git status
CONFLICT (rerere): conflict not auto-resolved

What this error means

This error occurs when Git's rerere ("reuse recorded resolution") feature attempts to automatically resolve a merge conflict based on a previously recorded resolution, but fails to apply it cleanly. The rerere system is designed to remember how you resolved a particular conflict and automatically apply that same resolution when the identical conflict appears again. When you see "CONFLICT (rerere): conflict not auto-resolved", Git is telling you that: 1. It recognized a conflict that rerere has seen before 2. It attempted to apply the previously recorded resolution 3. The three-way merge between the old conflict, old resolution, and new conflict did not produce a clean result This typically happens when the context around the conflict has changed enough that the previous resolution cannot be applied cleanly, or when the conflict markers themselves don't "cleanly nest" as rerere requires. The feature relies on conflict markers in the file to detect and match conflicts, so any modifications to the surrounding context can prevent automatic resolution.

Typical symptoms

  • Merge or rebase operation shows 'CONFLICT (rerere): conflict not auto-resolved' message
  • Git rerere status shows files with unresolved conflicts despite having recorded resolutions
  • Previously resolved conflicts require manual intervention again
  • Running 'git rerere remaining' shows paths that couldn't be auto-resolved
  • Files appear in conflict state even though you've resolved similar conflicts before
  • Rebase stops with conflicts that you've previously fixed

Common causes

  1. Context around the conflicting code has changed since the resolution was recorded
  2. Conflict markers don't cleanly nest (malformed or overlapping markers)
  3. The file already contains lines that look like conflict markers
  4. Conflicting submodules (rerere cannot track submodule resolutions)
  5. Binary files are involved (rerere only works with text files)
  6. The recorded resolution has been pruned by 'git rerere gc'
  7. Three-way merge between old conflict, old resolution, and new conflict fails
  8. Multiple different conflicts in the same file region

How to fix "CONFLICT (rerere): conflict not auto-resolved"

1Check which files have unresolved conflicts

First, identify which files rerere was unable to auto-resolve:

bash
# Show files with conflicts that weren't auto-resolved
git rerere remaining

# Show the current status of rerere
git rerere status

# See all files with merge conflicts
git status

The git rerere remaining command specifically shows paths that rerere couldn't handle, including:
- Files where the previous resolution couldn't be applied
- Conflicting submodules (which rerere cannot track)
- Files with malformed conflict markers

2Manually resolve the conflict

Since rerere couldn't auto-resolve, you need to manually fix the conflict:

bash
# Open the conflicted file in your editor
code path/to/conflicted-file.txt

# Or use your configured merge tool
git mergetool

Look for the conflict markers in the file:

bash
<<<<<<< HEAD
Your changes here
=======
Incoming changes here
>>>>>>> branch-name

Edit the file to resolve the conflict by:
1. Removing the conflict markers (<<<<<<<, =======, >>>>>>>)
2. Keeping the correct code (yours, theirs, or a combination)
3. Saving the file

After resolving, stage the file:

bash
git add path/to/conflicted-file.txt

Rerere will automatically record this new resolution for future use.

3Let rerere record the new resolution

Once you've resolved the conflict manually, rerere will learn the new resolution:

bash
# After staging the resolved file
git add path/to/resolved-file.txt

# Rerere automatically records the resolution
# You can verify with:
git rerere status

# Continue with your merge or rebase
git merge --continue
# or
git rebase --continue

The next time Git encounters the same conflict pattern, rerere will apply your new resolution.

Important: Rerere doesn't auto-commit or auto-stage. Even when it successfully applies a resolution, you still need to:
1. Review the changes with git diff
2. Stage the file with git add
3. Complete the merge/rebase

4Forget a bad recorded resolution

If rerere recorded an incorrect resolution that's causing problems, you can forget it:

bash
# Forget the resolution for a specific file
git rerere forget path/to/file.txt

# This removes the recorded pre-image and post-image for that file

After forgetting the resolution:
1. Abort and restart your merge/rebase
2. Resolve the conflict correctly
3. Rerere will record the new resolution

bash
# Example workflow to fix a bad resolution
git merge --abort
git rerere forget path/to/problematic-file.txt
git merge feature-branch
# Now resolve the conflict correctly
git add path/to/problematic-file.txt
git merge --continue

Alternatively, you can restore the original conflict markers without forgetting the resolution:

bash
# Restore original conflict markers to see the raw conflict
git checkout -m path/to/file.txt
5Verify rerere is enabled and configured correctly

Make sure rerere is properly enabled in your Git configuration:

bash
# Check if rerere is enabled
git config --get rerere.enabled

# Enable rerere globally
git config --global rerere.enabled true

# Optional: Auto-stage rerere-resolved files
git config --global rerere.autoupdate true

Configuration options:

| Setting | Description |
|---------|-------------|
| rerere.enabled | Enable/disable rerere (true/false) |
| rerere.autoupdate | Auto-stage resolved files (true/false) |

Note on autoupdate: Setting rerere.autoupdate true automatically stages files that rerere successfully resolves. However, you should still review changes before committing. Use --no-rerere-autoupdate flag on merge/rebase to override this for a specific operation.

bash
# Merge without auto-staging rerere resolutions
git merge feature-branch --no-rerere-autoupdate
6Clear the rerere cache if needed

If you have many outdated or problematic recorded resolutions, you can clear the cache:

bash
# Show rerere cache directory
ls .git/rr-cache/

# Remove all recorded resolutions (use with caution!)
rm -rf .git/rr-cache/*

# Or prune old resolutions automatically
git rerere gc

Default retention periods for `git rerere gc`:
- Unresolved conflicts: 15 days
- Resolved conflicts: 60 days

You can configure these:

bash
# Change retention for unresolved conflicts (in days)
git config --global gc.rerereUnresolved 30

# Change retention for resolved conflicts (in days)
git config --global gc.rerereResolved 90

After clearing the cache, you'll need to re-record resolutions as you encounter conflicts again.

Advanced notes

### How Rerere Works Internally

Rerere stores conflict information in the .git/rr-cache/ directory:

bash
.git/rr-cache/
  ├── <conflict-hash>/
  │   ├── preimage    # The conflicted state
  │   └── postimage   # Your resolution

When a conflict occurs, Git:
1. Strips some data from the conflict to make it more general
2. Creates a hash of the conflict
3. Stores the conflict as a "preimage"
4. When you commit, stores your resolution as "postimage"

For auto-resolution to work, the three-way merge between:
- The old preimage (original conflict)
- The old postimage (your resolution)
- The new conflict

...must succeed cleanly.

### Limitations of Rerere

Binary files: Rerere only works with text files. Binary file conflicts always require manual resolution.

Submodules: Conflicting submodules cannot be tracked by rerere. The message "rerere: conflict not auto-resolved" will always appear for submodule conflicts.

Nested conflicts: If conflict markers don't cleanly nest (e.g., overlapping or malformed markers), rerere cannot parse them:

bash
<<<<<<< HEAD
some code
<<<<<<< HEAD     # Nested marker - problematic
more code
=======

Lines resembling markers: If your code contains lines that look like conflict markers (<<<<<<<, =======, >>>>>>>), rerere may fail.

### Training Rerere from Existing Merges

You can "train" rerere from existing merge commits using the provided script:

bash
# Train rerere from recent merge commits
sh /path/to/git/contrib/rerere-train.sh HEAD~10..HEAD

# Train from all merges on a branch
sh /path/to/git/contrib/rerere-train.sh main

# Overwrite existing recordings
sh /path/to/git/contrib/rerere-train.sh --overwrite HEAD~5..HEAD

This script walks through merge commits and records the resolutions so rerere can use them in the future.

### Debugging Rerere Issues

bash
# See what rerere is doing with verbose output
GIT_TRACE=1 git merge branch-name 2>&1 | grep rerere

# Check the hash of a conflict
git rerere diff

# Show what resolution would be applied
cat .git/rr-cache/<hash>/postimage

### Disabling Rerere for Specific Operations

If rerere is causing problems with a particular merge:

bash
# Disable for a single merge
git -c rerere.enabled=false merge branch-name

# Or disable autoupdate only
git merge branch-name --no-rerere-autoupdate

### Best Practices for Long-Running Branches

When working with integration branches:

1. Record resolutions early: Resolve conflicts carefully the first time
2. Test after auto-resolution: Always verify rerere-applied resolutions are correct
3. Use autoupdate cautiously: Disable it if you want to review every resolution
4. Clear cache periodically: Run git rerere gc to remove stale resolutions
5. Share resolutions: The .git/rr-cache directory can be shared among team members (though this is rarely done)

Frequently asked questions

What does "CONFLICT (rerere): conflict not auto-resolved" mean?
This error occurs when Git's rerere ("reuse recorded resolution") feature attempts to automatically resolve a merge conflict based on a previously recorded resolution, but fails to apply it cleanly. The rerere system is designed to remember how you resolved a particular conflict and automatically apply that same resolution when the identical conflict appears again. When you see "CONFLICT (rerere): conflict not auto-resolved", Git is telling you that: 1.
How do I fix "CONFLICT (rerere): conflict not auto-resolved"?
Git's rerere (reuse recorded resolution) feature failed to automatically apply a previously recorded conflict resolution. You need to manually resolve the conflict and let rerere learn the new resolution.
What causes "CONFLICT (rerere): conflict not auto-resolved"?
Context around the conflicting code has changed since the resolution was recorded Conflict markers don't cleanly nest (malformed or overlapping markers) The file already contains lines that look like conflict markers
Is the "CONFLICT (rerere): conflict not auto-resolved" error serious?
It is a low-severity error — more of a blocker than a risk. The steps above resolve it.

Official resources & further reading