Ask one question: have I pushed a commit yet?
If not, reset. Soft to keep it staged, default to keep it unstaged, and hard to throw everything away.
If you already pushed the commit, use revert, which safely reverses changes with a new commit.
And if anything ever looks lost, check the reflog — your undo for the undo.
Want the full breakdown? Watch the full video: Undo anything in Git
Follow along for more git tips like this!