0

When I use git difftool to compare 2 history version of 1 file. I met a problem. After I enter the command, it will show hundreds of windows.

> git log --pretty=oneline <file_path>
<commit id0> <name>
<commit id1> <name>
...
<commit id15> <name>
> git diff <commit id1> <commit id5>
<here show difference>
> git difftool -y -x gvimdiff <commit id1> <commit id5>
<then hundreds of widows shows!>

What's the problem?

BBKing
  • 5
  • 4

1 Answers1

1

Do you mean that it shows one window for each file changed, and there are hundreds of files changed? If so, that is just the way git difftool works, but if your diff tool is able to diff whole directories (as kdiff3 or meld can do), you can use the --dir option to give you one diff interface in which you can then click to see individual file changes.

git difftool --dir <commit 1> <commit 5>
Mort
  • 3,379
  • 1
  • 25
  • 40
  • Thanks! If I want to compare 2 different version for 1 file, which command should I use? – BBKing Aug 07 '17 at 02:24
  • Or git doesn't provide this function. The only way is to use kdiff3 or meld? – BBKing Aug 07 '17 at 02:28
  • The problem is solved! Thanks! I have to add the file path behind the command. > git difftool -y -x bcompare – BBKing Aug 07 '17 at 02:41
  • But it still doesn't work with "-x gvimdiff", but I can use "-x vimdiff" or "-x bcompare"! Thanks! – BBKing Aug 07 '17 at 02:44