Sad but true: Git is simply too hard. One thing driving said truth is that undoing things often requires jumping through obscure hoops. Here’s what Waleed Khan has to say on the matter:
Well, it’s not that it’s too easy to lose your data — but rather, that it’s too difficult to recover it. For each operation you want to recover from, there’s a different “magic” incantation to undo it. All the data is still there in principle, but it’s not accessible to many in practice.
Here’s my theory: novice and intermediate users would significantly improve their understanding and efficacy with Git if they weren’t afraid of making mistakes.
To address this, Waleed created
git undo as part of his git-branchless suite of tools.