gpt4 book ai didi

git rerere 仅手动解决

转载 作者:太空狗 更新时间:2023-10-29 13:42:53 29 4
gpt4 key购买 nike

git rerere 愉快地存储我的冲突解决方案,并在相同的冲突再次出现时自动应用它们。

但是,有时我会遇到与不同上下文的 merge 冲突,我不想自动 merge 。

有没有办法让 git rerere 记住冲突解决方案,但需要显式调用 git rerere 才能应用它们?

要明确一点,我不是在寻找 git rerere cleargit rerere forget,而是简单地说,自动解析除非明确指示,否则 merge 冲突(如果它能在申请前向我显示建议的解决方案,则奖励!)

最佳答案

我不知道有什么方法可以不为特定的大块头应用 rerere。
您确实可以忘记文件的 rerere 分辨率 ( as discussed here ),但不仅仅是一个大块头。

您将不得不直接使用 .git/rr-cache,如 mentioned in this patch :

We record a previously seen conflict and its resolution in a subdirectory of $GIT_DIR/rr-cache, and the name of the subdirectory is computed by hashing the "shape" of the conflicted hunk.
When a similar-looking conflict is encountered later in the working tree, "git rerere" tries to replay the recorded resolution by running a three-way merge to apply the change to go from the previous conflict to the previous resolution to the current conflicted state.

关于git rerere 仅手动解决,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35761389/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com