Linux command
git-rerere 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Enable rerere
git config rerere.enabled true
Show recorded resolutions
git rerere status
Show diff of resolution
git rerere diff
Clear recorded resolutions
git rerere clear
Forget resolution
git rerere forget [file]
说明
git rerere (reuse recorded resolution) remembers how you resolved merge conflicts and automatically reapplies those resolutions in future merges. This is especially valuable during repeated merges and rebases. When enabled, Git records conflict resolutions. On subsequent merges with identical conflicts, the previous resolution is applied automatically, eliminating repetitive conflict resolution work.
参数
- status
- Show paths with recorded resolutions.
- diff
- Show diff for current resolutions.
- clear
- Clear recorded resolutions.
- forget _PATH_
- Forget resolution for path.
- gc
- Prune old recordings.
- --help
- Display help information.
FAQ
What is the git-rerere command used for?
git rerere (reuse recorded resolution) remembers how you resolved merge conflicts and automatically reapplies those resolutions in future merges. This is especially valuable during repeated merges and rebases. When enabled, Git records conflict resolutions. On subsequent merges with identical conflicts, the previous resolution is applied automatically, eliminating repetitive conflict resolution work.
How do I run a basic git-rerere example?
Run `git config rerere.enabled true` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does status do in git-rerere?
Show paths with recorded resolutions.