Two small Git situations that come up often enough to be worth writing down, rather than re-deriving from git help every time.
Undoing a rebase that went wrong
git rebase rewrites history, and every point it passes through along the way is still recoverable from the reflog, even after the rebase finishes:
The reflog is the safety net that makes rebasing locally low-risk. It's local-only and expires after a while (90 days by default), so this works for "I rebased five minutes ago and regret it," not for recovering history from months back.
Resetting the author on every commit
Useful after importing a repository with a placeholder author, or fixing a misconfigured user.email that leaked into a run of commits:
filter-branch rewrites every commit in the range, so every hash after the first affected commit changes. Fine on a repo only you have a copy of; coordinate with anyone else who has a clone before doing this on something shared, since their next pull will look like a wall of conflicts.