Why does git mergetool open 4 windows in vimdiff? (I'd expect 3)

前端 未结 5 1554
北荒
北荒 2021-01-30 14:28

When I met a conflict, I tried to use git-mergetool to solve it. I typed:

>git mergetool -t vimdiff

It opened vimdiff

5条回答
  •  有刺的猬
    2021-01-30 14:57

    I'll second the fugitive recommendation.

    You could also try out splice.vim. It's a Vim plugin designed to act as a git or mercurial mergetool drop-in replacement. It allows you to easily shuffle various views of the conflict. It's also very quick, straightforward and does a good job at making merging more intuitive. Here's a screencast.

    The files you've listed are:

    1. The local file containing the conflict.
    2. The file in the branch you're merging into.
    3. The file in the branch you're merging from.
    4. The file as it was in both branch ancesestor node. This file is very useful for figuring out what's going on!

    Hope this helps.

提交回复
热议问题