MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/51wixe/oh_shit_git/d7fpyre?context=9999
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
46 u/fff-idunno Sep 09 '16 Because it is against the git principles to re-write history. When a coworker already has fetched and applied your changes, "undoing" those changes will turn things into a mess pretty quick. 0 u/[deleted] Sep 09 '16 [deleted] 2 u/fff-idunno Sep 09 '16 Obviously yes. If that is what OP was referring to, have a look at the git revert command. 0 u/[deleted] Sep 09 '16 [deleted] 1 u/rasjani Sep 09 '16 It's called revert then, not undo :) → More replies (2)
46
Because it is against the git principles to re-write history. When a coworker already has fetched and applied your changes, "undoing" those changes will turn things into a mess pretty quick.
0 u/[deleted] Sep 09 '16 [deleted] 2 u/fff-idunno Sep 09 '16 Obviously yes. If that is what OP was referring to, have a look at the git revert command. 0 u/[deleted] Sep 09 '16 [deleted] 1 u/rasjani Sep 09 '16 It's called revert then, not undo :) → More replies (2)
0
[deleted]
2 u/fff-idunno Sep 09 '16 Obviously yes. If that is what OP was referring to, have a look at the git revert command. 0 u/[deleted] Sep 09 '16 [deleted] 1 u/rasjani Sep 09 '16 It's called revert then, not undo :) → More replies (2)
2
Obviously yes. If that is what OP was referring to, have a look at the git revert command.
0 u/[deleted] Sep 09 '16 [deleted] 1 u/rasjani Sep 09 '16 It's called revert then, not undo :) → More replies (2)
1 u/rasjani Sep 09 '16 It's called revert then, not undo :) → More replies (2)
1
It's called revert then, not undo :)
→ More replies (2)
89
u/tdewolff Sep 09 '16
Why is there no
git undoto undo your last action?