git difftol --dir-diff beteen head and files in staging area

65 Views Asked by At

I have the following in my ~/.gitconfig

    dt = difftool --dir-diff
[diff]
    tool = kdiff3

So if I want to see what have changed since for example previous commit and the last one I run:

git dt HEAD HEAD~1 (or git dit HEAD~1 HEAD, doesn't matter.

Is it possible to do the same for staged but not yet committed files? What I want to do is:

```git dt HEAD <staged_but_not_committed`>``

Is it possible?

1

There are 1 best solutions below

0
LeGEC On BEST ANSWER

Yes, with the --cached option

git difftool -d --cached
git diff --cached