April 21, 2015
git diff
When using git at the command line, a quick way to check changes that have been made is git diff
. This however only shows changes that have not yet been staged, that is, changes made before git add
.
git diff HEAD
shows changes that have been made after a git add
but before a git commit
.
git diff HEAD HEAD^
shows the difference between HEAD
and its previous commit.
git log --decorate=short
will show where HEAD
is as well as other tags.
- ksami