Undo a git rerere resolution that was done in a rebase

后端 未结 1 622
滥情空心
滥情空心 2020-12-29 19:05

Okay, so I really like the git rerere command. Although, I haven\'t really used it that much other than letting it auto-magically record my conflicts and resolve them for m

相关标签:
1条回答
  • 2020-12-29 19:38

    To simply remove all previous rerere resolutions, run rm -rf .git/rr-cache to remove the cache.

    For a specific merge, you can tell rerere to forget the recorded resolution by re-executing the merge and allowing rerere to apply its recorded resolution in the work tree.

    You can check out a' and then do a git merge b to get back into that situation (you'll probably be in a checkout of a detached head since you specified the commit hash of a', so be aware that you're not on a branch).

    Then use git rerere forget FILE-WITH-BAD-MERGE where to specify the file whose recorded conflict resolution should be forgetten.

    forget <pathspec>
    Reset the conflict resolutions which rerere has recorded for the current conflict in .

    (From the Git documentation for git-rerere.)

    0 讨论(0)
提交回复
热议问题