If I run git diff
I see the changes in my working tree, and if I run git diff --staged
(alternatively --cached
) then I see the changes that are staged (w/ git add
) but is there a way with git diff
to see all in one go?
-
7Amazing graphic explaining the different types of `git diff`s here! http://stackoverflow.com/questions/1587846/how-do-i-show-the-changes-which-have-been-staged/1587952#1587952 – swrobel Oct 24 '12 at 23:10
-
`git status -v -v` will soon shows just that (git 2.3.4+, Q2 2015). See [my answer below](http://stackoverflow.com/a/29116346/6309). – VonC Mar 18 '15 at 07:30
3 Answers
If you mean the changes between the working tree and your HEAD commit (i.e. both staged and unstaged changes together) this is just done with:
git diff HEAD

- 755,051
- 104
- 632
- 656
-
2
-
6@user946850: And `git diff HEAD` shows all the changes (staged and unstaged) in one invocation of `git diff`. – CB Bailey Oct 24 '12 at 21:08
-
On second reading, perhaps you're right. Note that this already has been covered here: http://stackoverflow.com/a/1587952/946850 – krlmlr Oct 24 '12 at 21:10
-
-
@user946850: that's not a duplicate, though, because it specifically asks for staged changes [only]. I'm sure there is a duplicate somewhere. – CB Bailey Oct 24 '12 at 21:12
-
I didn't say it was an exact dupe, and I haven't found "the" exact dupe yet. – krlmlr Oct 24 '12 at 21:14
-
I promise I searched hard! Anyway, thanks for the answer, this does the trick. – swrobel Oct 24 '12 at 23:09
-
This should be the accepted answer because it works just as well with `git difftool HEAD` – Gandalf Saxe Oct 08 '19 at 10:31
-
It didn't show new added untracked file on my end :-( But after I did 'git add newFile' it showed it @CB Bailey – alper Apr 06 '20 at 13:29
-
From git version 1.8.5 onward, `HEAD` can be replaced with `@` in most situations, so you can run a shorter version of the command in the answer: `git diff @`. – nishanthshanmugham Feb 23 '23 at 12:12
Is there a way with git diff to see all in one go?
There is, with Git 2.4.0+ (April 2015).
See commit 4055500 from Michael J Gruber mjg
:
commit
/status
: show the index-worktree diff with-v -v
(or-vv
)
git commit
andgit status
in long format show the diff between HEAD and the index when given-v
. This allows previewing a commit to be made.They also list tracked files with unstaged changes, but without a diff.
Introduce '
-v -v
' (or-vv
) which shows the diff between the index and the worktree in addition to theHEAD
index diff. This allows a review of unstaged changes which might be missing from the commit.In the case of '
-v -v
' (or-vv
), additional header linesChanges to be committed:
and
Changes not staged for commit:
are inserted before the diffs, which are equal to those in the status part; the latter preceded by 50*
-
to make it stick out more.
In the OP's case, a simple git status -v -v
(or git status -vv
) will show both staged and unstaged diffs.

- 29,210
- 11
- 96
- 131

- 1,262,500
- 529
- 4,410
- 5,250
-
1In case it's not obvious to anyone, you can also combine the flags: `git status -vv` – Subfuzion Oct 22 '16 at 00:37
The diffuse visual diff tool can do that: It will show three panes if some but not all changes are staged. In the case of conflicts, there will even be four panes.
Invoke it with
diffuse -m
in your Git working copy.
If you ask me, the best visual differ I've seen for a decade.

- 25,056
- 14
- 120
- 217
-
3Great tip and much appreciated, but not exactly an answer since I asked for the git command to do this. Marking the other one as the answer... – swrobel Oct 24 '12 at 23:10