Reputation: 465
I deleted some files some time ago that I need back. I'm using Git.
How do I undo a commit that was done some time ago and leave everything else since then as is?
Upvotes: 0
Views: 20
Reputation: 249183
You can do this:
git revert <revision>
Just find the sha1 revision ID in your git log
that you want to undo, and this will make a commit which is the opposite, thereby undoing the old commit.
Upvotes: 2