There's a little-known feature of git called "Reuse Recorded Resolutions", or rerere
.
You can enable it globally by running git config --global rerere.enabled true
.
If rerere
is enabled, git
will automatically save conflict resolutions, and will reuse those resolutions later if it encounters the same conflicts. This has the net result of not requiring the user to re-resolve these previously seen conflicts.
The feature is explained here - Git - Rerere.
The documentation for git rerere
command is here - git-rerere(1).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…