I like to commit often, and then continuously amend my last commit.

Here's a little snippet to show only the diff for the last commit:

git show `git log | head | awk 'FNR == 1 {print $2}'`

@stevenroose

Scans your harddrive looking for bitcoin private keys.

@stevenroose

Just joking :)

"git show" with a commit hash shows the diff.

The rest of the command is just to get the lat commit hash from "git log".

Follow

@jcbrand Git show by default shows the last commit, right?

@jcbrand Also you can get the last commit with HEAD, the one before is HEAD~1, HEAD~2...

@stevenroose

I've only ever used it with a hash.

Makes perfect sense now that you mention it.

Sign in to participate in the conversation
unidentified instance

(instance image by мøтħer ¢røω)