启用git rerere有什么缺点吗? [英] Are there any downsides to enabling git rerere?

查看:138
本文介绍了启用git rerere有什么缺点吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读过关于git的rerere功能的各种东西,我正在考虑启用它。但是我还没有看到任何人提到使用它时可能出现的任何可能的问题。我必须假设有一个缺点,或者它可能会默认启用。那么启用rerere有什么不足吗?有什么潜在的问题可能导致这种情况不会发生?

解决方案

如果您不正确地进行合并,则丢弃它,然后执行相同再次合并,它会再次不正确。不过,您可以忘记录制的分辨率。从文档


git rerere forget< pathspec>

这会重置针对< pathspec> 中当前冲突记录的冲突解决方案。


小心在特定路径上使用它;你不想在任何地方吹走所有录制的分辨率。 (忘了没有参数)不建议使用,除非您输入 git rerere forget。来显式请求它。)



但是如果你不这么认为,你可能会很容易把这个不正确的合并放到你的历史记录中。


I've read various things about git's rerere feature, and I'm considering enabling it. But I haven't seen anyone mention any possible problems that could arise while using it. I have to assume there is a downside, or it would probably be enabled by default. So is there any downside to enabling rerere? What potential problems can it cause that would not otherwise occur?

解决方案

If you do a merge incorrectly, then discard it, then do the "same" merge again, it will be incorrect again. You can forget a recorded resolution, though. From the documentation:

git rerere forget <pathspec>

This resets the conflict resolutions which rerere has recorded for the current conflict in <pathspec>.

Be careful to use it on specific paths; you don't want to blow away all of your recorded resolutions everywhere. (forget with no arguments has been deprecated to save you from doing this, unless you type git rerere forget . to explicitly request it.)

But if you don't think to do that, you could easily end up putting that incorrect merge into your history..

这篇关于启用git rerere有什么缺点吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆