Differences between the staged and unstaged versions of the same file, using difftool [duplicate] Differences between the staged and unstaged versions of the same file, using difftool [duplicate] git git

Differences between the staged and unstaged versions of the same file, using difftool [duplicate]


git diff will show the difference between your workspace and the index.(the index is where the staged files live)

This may not seem obvious because we usually use git diff to see the changes in the workspace vs what is checked in. However, technically git diff shows workspace vs index, and if you haven't added changes to the index, then the index matches what you checked out.

  • to see workspace vs repo: git diff HEAD
  • to see index vs repos: git diff --cached (can also use --staged)
  • to see workspace vs index: git diff


If you run the command git status -vv you will see the textual changes of the file. See doc.