> What do you mean by idempotent?
For every git command, provide a way to undo the previous command, if possible.
For example, `git checkout -b abc`, a `git undo` would execute `git branch -D abc`.
This is just an example, I know you can find many problems
and with this approach and edge cases when it doesn't work, but we can make life easier for beginners in most cases.
> Clicking undo two times and going back only one step
Huh? I never meant that. Click undo two times would go back two steps, naturally.
But of course, there are some actions that can't undo, so give user a warning or something.