I find myself typing this pretty often, like when I made some change, committed it, and then either need to look up something I did there to figure out what to do next, or make sure I didn't add anything unintended to the commit before pushing it to a remote.
Admittedly, diff HEAD^ HEAD
is fast enough to type (git di
TABH
TAB←^ H
TAB), but it still feels like there should be a better way.
How do I easiest see all changes made in the last commit?
Try git show
. Without other options, it shows a diff of the latest commit.
git show $something
shows the content of $something
in a user-friendly way. When $something
refers to a file, git show
will display the file's content. When it refers to a commit, Git shows the commit (author, date, commit log and diff). git show
without more arguments is equivalent to git show HEAD
.