3 ms·
I don't think the issue is so much that it's "hard" as that it's "not undo." As a general rule of thumb, command line tools often ignore decades of UX best pra
by shadowgovt 5y ago
I don't think the issue is so much that it's "hard" as that it's "not undo."
As a general rule of thumb, command line tools often ignore decades of UX best practice that have grown up. One of those is that operations (particularly destructive ones) should be easily reversible. It recognizes that human error is common.
And having "undo" specifically recognizes that human error puts the user in an emotional state where restoring things via complex operations is inviting risk. A typo to `git undo` is unlikely to be another command. A typo in the SHA (or an @{2} instead of an @{1}) for `git reset` will compound the error.
... that having been said, I'm going to go add `git undo` as an alias for `git reset HEAD@{1}` right now.