git rerere remembers how you resolved a merge conflict and automatically applies the same resolution next time. Useful for long-lived feature branches.
git rerere (Reuse Recorded Resolution) is a feature most engineers don't know exists. It remembers how you resolved a merge conflict and automatically applies the same resolution the next time the same conflict appears.
git config --global rerere.enabled trueThat's it. Once enabled, Git records conflict resolutions in .git/rr-cache/.
Long-lived feature branches that need to be repeatedly rebased or merged onto a changing main branch. Without rerere, you resolve the same conflicts every time. With rerere, Git remembers.
Specifically useful on this portfolio when I had a feature branch running parallel to main with changes to globals.css and schema.ts — files that were also being modified on main. After enabling rerere, I only had to resolve those conflicts once.
# First conflict — resolve manually
git merge main
# ... fix conflicts ...
git add .
git commit # rerere records the resolution
# Next time the same conflict appears (e.g., after another rebase)
git merge main
# Git says: "Resolved 'globals.css' using previous resolution."
# Conflict is already fixedIf you resolved a conflict incorrectly the first time, rerere will replay the wrong resolution. Run git rerere forget <path> to clear a recorded resolution for a specific file.
Karanveer Singh Shaktawat
Full Stack Engineer & Infrastructure Architect
Building portfolio, contributing to open source, and seeking remote full-time roles with significant technical ownership.
Pick what you want to hear about — I'll only email when it's worth it.
Did this resonate?
git worktree lets you have multiple working trees from one repo — no stashing, no switching, no friction.
How to use Docker multi-stage builds to go from a 2GB Rust build image to a 12MB production image.
Also, rerere only works for exact conflict markers. If the surrounding context changes significantly, it won't match and you'll resolve manually again.
For a solo developer doing frequent rebases, it's a quiet quality-of-life improvement worth enabling globally.