4 ms·
You know what would make me faster at git? "git undo" : undo the last git command line, whatever it did. Especially if you don't understand what it did or it o
by pjc50 8y ago
You know what would make me faster at git?
"git undo" : undo the last git command line, whatever it did. Especially if you don't understand what it did or it overwrote local files.
- iwwr 8y agoYou could store your git refs in another git repo and take a snapshot of those after each command that changes things.
- lgas 8y agohttps://github.com/tj/git-extras https://github.com/tj/git-extras provides "git undo" (among others).
- jwilk 8y agoIt's a pretty useless wrapper over "git reset": https://github.com/tj/git-extras/blob/master/bin/git-undo https://github.com/tj/git-extras/blob/master/bin/git-undo It won't help you if you don't understand what the last command did or when it overwrote local files; it'll just make everything worse.
- deleted 8y ago[deleted]
- sverhagen 8y agoNice, but the README suggests it only does commits. I already have a simple alias for that. The parent comment wanted to undo anything.
- cormacrelf 8y agoGitup has this for many operations. http://gitup.co/ http://gitup.co/
- karmakaze 8y agoMany operations have an --abort option during the process. In other cases, there's `git reflog`.
- floo 8y agoNot a CLI, but GitKraken does that for most commands.
- rplnt 8y agoSome operations can't be undone. So you would need to wrap them in commands that would make undone possible. That would be interesting...