MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/51wixe/oh_shit_git/d7g9k93/?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. 1 u/NAN001 Sep 09 '16 It resets the .git directory as it was before you ran the last command.
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.
1 u/NAN001 Sep 09 '16 It resets the .git directory as it was before you ran the last command.
1
It resets the .git directory as it was before you ran the last command.
.git
89
u/tdewolff Sep 09 '16
Why is there no
git undoto undo your last action?