git undo # last command
- From
- Saša Tomić <tomic80@gmail.com>
- Date
- Aug 16, 2013, 08:55 UTC
- Message-ID
- <CAAUyY9ADW2iHVWhTGcTF8j0hrdumpBcLv_mLo0y8VDAyBpftJQ@mail.gmail.com>
Hi to all,
I've been using git for some time now, but I'm in no way a git expert. I typically hack my way through the variety of commands that git provides. I believe that most git users work similarly.
it just occurred to me -- the command that I would REALLY like to have is simple:
git undo
which 'undo'es the last action that has not been pushed yet -- whichever the action is. Similarly to the 'back' button in the browser.
Currently, when I make a mistake, I have to search the net to find the *right* command that will undo my last action/command. That's boring and time consuming. git undo would make things much easier, I believe.
Would creating such command be possible? I guess that 'behind the scenes', the command could analyze the reflog and act based on that.
What do you think?
-- Best regards, Saša