This answer is great for seeing a visual diff between two files that are checked into git: How do I view 'git diff' output with a visual diff program?
Howev
Try "difftool" (assuming you have diff tools setup) - see https://www.kernel.org/pub/software/scm/git/docs/git-difftool.html
I find name status good for the summary but difftool will iterate the changes (and the -d
option gives you the directory view), e.g.
$ git difftool their-branch my-branch
Viewing: 'file1.txt'
Launch 'bc3' [Y/n]:
...
Or as @rsilva4 mentioned with -d
and default to your current branch it is just - e.g. compare to master:
$ git difftool -d master..
...and yes - there are many variations - https://www.kernel.org/pub/software/scm/git/docs/git-reset.html
If you use the excellent WebStorm editor, you can compare with any branch you'd like:
You can also use vscode to compare branches using extension CodeLense, this is already answered in this SO: How to compare different branches on Visual studio code
If you are using OSX or Windows 7+, Atlassian SourceTree works very well for this. It is free.
You can see staged changes in a side-by-side diff setup, and you easily compare local with remote and any other two branches. When multiple files are selected, the diff shows up as below:
Assuming you have checked out a feature branch and you want to see the diff against 'master', right-click on the 'master' branch and select "Diff against current"
Unfortunately, it doesn't seem as if it will be available on *nix distributions anytime soon.
Use git diff with a range.
git diff branch1..branch2
This will compare the tips of each branch.
If you really want some GUI software, you can try something like SourceTree which supports Mac OS X and Windows.
If you're using github you can use the website for this:
github.com/url/to/your/repo/compare/SHA_of_tip_of_one_branch...SHA_of_tip_of_another_branch
That will show you a compare of the two.