Alex Rivera | Logout

Explore git-diff output in a GUI?

Asked 2010-11-11T23:17:16.107
31

Is there program that allows output of a git-diff command to be explored in a GUI?

What i am looking for is something similar to the how SmartGit displays its view of the differences between the working copy and the HEAD. Where each of the files that are different to the HEAD are displayed and the diff for the focused file is displayed.

I am not sure if it is possible to make SmartGit display the output of a "git diff" command.

alt text

Edit
Report

2 Answers

18

Starting with git v1.7.11, you can use git difftool --dir-diff to perform a directory diff.

The answer that follows applies to git installations older than v1.7.11.


As mentioned by others, git difftool may be used to open your diff in a GUI. However if you have multiple files with changes, it will open a separate instance of the GUI for each file.

I wrote a script to work around this "feature" and allow all the files to be opened in a single GUI instance. You can find the git diffall script on GitHub.

Also, you may be interested in this related SO question:

git difftool, open all diff files immediately, not in serial

answered 2010-11-29T14:46:06.413
0

git diff has a --ext-diff option that pipes the diff output to an external diff program. Popular open source diff programs that are known to work with Git include kdiff3 and Meld.

answered 2010-11-11T23:50:40.720

Your Answer