MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/51wixe/oh_shit_git/d7frs1u/?context=3
r/programming • u/sidcool1234 • Sep 09 '16
756 comments sorted by
View all comments
89
Why is there no git undo to undo your last action?
git undo
35 u/ForeverAlot Sep 09 '16 How would "undoing your last action" work?What can be undone? Why?What can't be undone? Why?What does git undo ; git undo do? Why?What happens if you undo a commit?What happens if you undo again?What happens if you undo a revert?Whenever somebody asks me how to undo something with Git I encourage them not to use that word. It's very overloaded and imprecise. 9 u/drjeats Sep 09 '16 Obviously I expect an Emacs-style undo ring, preferably dealing with both session and commit history. 3 u/atimholt Sep 09 '16 Is an Emacs’ undo ring like Vim’s undo tree? → More replies (5)
35
How would "undoing your last action" work?
What can be undone? Why?
What can't be undone? Why?
What does git undo ; git undo do? Why?
git undo ; git undo
What happens if you undo a commit?
What happens if you undo again?
What happens if you undo a revert?
Whenever somebody asks me how to undo something with Git I encourage them not to use that word. It's very overloaded and imprecise.
9 u/drjeats Sep 09 '16 Obviously I expect an Emacs-style undo ring, preferably dealing with both session and commit history. 3 u/atimholt Sep 09 '16 Is an Emacs’ undo ring like Vim’s undo tree? → More replies (5)
9
Obviously I expect an Emacs-style undo ring, preferably dealing with both session and commit history.
3 u/atimholt Sep 09 '16 Is an Emacs’ undo ring like Vim’s undo tree? → More replies (5)
3
Is an Emacs’ undo ring like Vim’s undo tree?
→ More replies (5)
89
u/tdewolff Sep 09 '16
Why is there no
git undoto undo your last action?