What did I just commit?

So imagine that you blindly committed some changes with `git commit -a`, and you are not satisfied with the particular content of the commit you just created.

So, imagine that you just mindlessly committed changes  git commit -a and are not satisfied with the particular content of the commit you created. You can now show the latest commit on your current HEAD with the following:

git show

or

git log -n1 -p

If you want to see a file at a specific commit, you can also do this (where <commitid> is the commit you're interested in):

git show <commitid>:filename

Subscribe to GIT.WTF!?!

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
[email protected]
Subscribe