From abb085de05e22380bea5ebeda877198cffe931d7 Mon Sep 17 00:00:00 2001 From: "Stuart P. Bentley" Date: Thu, 14 Aug 2014 11:46:47 -0700 Subject: [PATCH] Add "Oh crap, what did I just commit" --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 4f9d249..e44b730 100644 --- a/README.md +++ b/README.md @@ -274,3 +274,12 @@ And finally, let's cherry-pick the commit for bug #14: ``` (14)$ git cherry-pick 5ea5173 ``` + + +## What did I just do? + +Let's say that you just blindly committed changes with `git commit -a` and you're not sure what the actual content of the commit you just made was. You can check the difference between your current HEAD and what your HEAD just was with: + +``` +(master)$ git diff HEAD@{1} HEAD +```