Ever have that “D’oh!” moment, realizing just after you’ve committed some new change that it needs just one more little tweak? (For instance, leaving in some debugging code. Not that I’ve ever done this.)

Luckily, git’s --amend flag is here for you!

Here’s a post that walks you through using it, and the git documentation on undoing things if you want a more in-depth discussion.

On Tumblr