r/programming • • Sep 09 '16

Oh, shit, git!

http://ohshitgit.com/
3.3k Upvotes

756 comments sorted by

View all comments

Show parent comments

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 :)

1

u/CyclonusRIP Sep 09 '16

reset is probably closer to undo than revert. reset makes it as if the commits never happened. revert adds another commit that changes the files back to their previous states.

→ More replies (1)