Ulrich Windl a écrit :
3) "git undo": If possible undo the effects of the last command.
If impossible, add confirmations for some "dangerous" (non-obvious) commands
before doing possibly harmful things. Maybe adding a kind of "user-level setting"
(novice, expert, guro) could control such confirmations.
Why ?
All objects stored are immutable, and some tools keep informations
(ORIGIN_HEAD, refs/original) to allow a undo hand-made.
Moreover the reflog (and stash if you want to use it for this use) store
informations during time...
So it's possible to provide a generic undo for all commands that change
refs.
Maybe an "undo" directory in $GIT_DIR, which will a keep a copy version
of all refs. Every commands store the current refs in this folder _before_
to change anything, and the undo restore them all.
At least, a "lastcmd" (for example) file could be added in this
directory to allow an more clever undo.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html