我已经阅读了有关 git 的 rerere
功能的各种信息,并且我正在考虑启用它。
The
git rerere
functionality is a bit of a hidden feature. The name stands for “reuse recorded resolution” and, as the name implies, it allows you to ask Git to remember how you’ve resolved a hunk conflict so that the next time it sees the same conflict, Git can resolve it for you automatically.
但我还没有看到任何人提到使用 rerere
时可能出现的任何问题。
我必须假设有一个缺点,否则它可能会默认启用。那么启用 rerere 有什么缺点吗?它会导致哪些原本不会发生的潜在问题?
最佳答案
如果 merge 不正确,则丢弃它,然后再次进行“相同” merge ,它会再次不正确。不过,您可能会忘记记录的分辨率。来自 the documentation :
git rerere forget <pathspec>
This resets the conflict resolutions which rerere has recorded for the current conflict in
<pathspec>
.
在特定路径上使用要小心;您不想随处吹走所有记录的决议。 (不带参数的 forget
已被设为 deprecated,以避免您执行此操作,除非您键入 git rerere forget .
明确请求它。)
但如果您不想这样做,您很可能最终会将错误的 merge 放入您的历史记录中。
关于git - 启用 git rerere 有什么缺点吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5519244/