Moves HEAD back one commit and leaves everything staged, which is what you usually want after committing too early.
Category
Snippets in Git
Binary search across history. Mark a known good and a known bad commit and git narrows it down for you.
Finds every commit whose diff added or removed a piece of text, including in files long since deleted.
The reflog remembers where HEAD has been for about ninety days, so a deleted branch is almost never really gone.
Adds forgotten files to the previous commit and leaves the message exactly as it was.
Lists the commits and the files a merge would bring in, so a surprise is less likely.
For the config file that should never have been committed. Add it to .gitignore afterwards.
Finds the branches that are safe to delete, and the ones that are not.