If you don’t know git internals, mistype a non-obvious command and lose a bunch of commits, then “look in the reflog” advice is frankly adding insult to injury.
I want to get things done fast and with less cognitive load, magit allows me to, git doesn't.
What's right for one isn't right for all.
Git is garbage collected, even if a commit is dropped from a branch it won't simply disappear immediately afterwards. The object is still in the git repository and it can still be reached, most easily through the reflog. Only when garbage collection is performed will any unreachable commits be deleted.
I've still managed to do it (or maybe I used git rm to delete some files that weren't committed?) so let me give one more shout out to 'git fsck' which saved me here.
If you ever run into this, you can use `git reflog` to see the history of your local actions. It's possible to revert almost any action with it.
Reset a few commits that you've never pushed to remote? No worries! Just go to `git reflog`, find a point before it happened, and `git reset` to it.
And you're back before "OOPS" :) It's really hard to lose changes once they've been committed.