Skip to content

Instantly share code, notes, and snippets.

@copyleftdev
Created May 25, 2026 20:20
Show Gist options
  • Select an option

  • Save copyleftdev/938fb17aead0c105300e682bf3c21ed5 to your computer and use it in GitHub Desktop.

Select an option

Save copyleftdev/938fb17aead0c105300e682bf3c21ed5 to your computer and use it in GitHub Desktop.
git rerere — reuse recorded conflict resolutions
# git rerere — never resolve the same conflict twice
# Enable once globally, then forget it's there.
git config --global rerere.enabled true
# First time you hit a conflict:
# resolve it manually, then:
git add src/the-file.py
git commit -m "merge: resolved"
# rerere silently records the resolution fingerprint
# Next time the identical conflict zone appears (rebase, cherry-pick, retry):
# rerere auto-applies the fix.
git status
# rerere: re-applying resolution for src/the-file.py
# Inspect saved resolutions:
ls .git/rr-cache/
# Share rerere cache with your team:
git config --global rerere.autoUpdate true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment