Created
May 25, 2026 20:20
-
-
Save copyleftdev/938fb17aead0c105300e682bf3c21ed5 to your computer and use it in GitHub Desktop.
git rerere — reuse recorded conflict resolutions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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