用 rerere 复用冲突解决方案
记录冲突的解决方式并在下次自动应用。
运行 git config rerere.enabled true,开始记录并重放解决方案。
01命令
命令
$ git config rerere.enabled true02作用说明
反复变基时同样的冲突会再次出现;rerere 会记住解决方式并在下次自动应用,节省大量手工劳动,是终端工作流中自然的自动化特性。
03风险
!注意: 上下文变化时自动解决可能出错;提交前请审查重放的代码块。
04撤销
✓无需撤销——该命令不会改变持久状态。
05来源
- git-rerere documentation依据: Documents rerere, which records conflict resolutions and reuses them.
最后验证: 2026-10-13 · 分类: 开发者