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.
You can run the git diff HEAD command to compare the both staged and unstaged changes with your last commit. You can also run the git diff <branch_name1> <branch_name2> command to compare the changes from the first branch with changes from the second branch.
Diffing is a function that takes two input data sets and outputs the changes between them. git diff is a multi-use Git command that when executed runs a diff function on Git data sources. These data sources can be commits, branches, files and more.
Why do you get no git diff output before adding? Git does not treat files in the filesystem as automatically included in the version control system. You have to add things explicitly into the Git repository (as you are doing by adding the current directory with git add . ).
Use ONLY q+enter to exit. It's possible to break out by repeatedly typing q+enter+q+enter+q+enter until the end of time no matter what the console shows.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With