Search notes:

git diff

git diff show changes between
Show differences between two commits:
git diff 2a532db 5949ddb
Use --cached to compare staging area with repository. --staged is a synonym for --cached. Without --cached (or --staged), git diff compares working tree to repository:
git diff --cached
The following command shows the differences of a given file between its current local HEAD and the modified (uncommitted) changes to this file:
git diff HEAD path/to/file.txt
The diff between the original repository and the local HEAD(?):
git diff  master  origin/master

See also

git difftool
git commands

Index