Git Undo
Tell me if you recognize this scenario: you’re in the middle of rewriting your local commits when you suddenly realize that you have gone too far and, after one too many rebases, you are left with a history that looks nothing like the way you wanted. No? Well, I certainly do. It was in one of those moments of despair that I finally decided to set out to create my own git undo command. Here’s what I came up with and how I got there.