Interview Prep/Git & GitHub/Merge and Rebase Problems

A recorded `rerere` resolution is wrong and gets re-applied automatically on every rebase.

AdvancedTroubleshootingMerge and Rebase Problems
Answer

Likely causes → rerere stored an earlier, incorrect resolution for that conflict and replays it silently.

Diagnose →

git rerere status
git rerere diff
ls .git/rr-cache

Fix → Forget the bad resolution and redo the conflict: git rerere forget path/to/file, then git checkout --merge path/to/file to bring the markers back and resolve again. As a last resort, delete the specific folder under .git/rr-cache.

Prevent → Review the files rerere resolved (git diff) before staging them, and clear the cache after major refactors.

All Git & GitHub questions Roadmap: Git & GitHub

More on Merge and Rebase Problems