Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I ran a revert commit in git extensions, and I did not realize it was going to remove all my code from exclipse as a result. How do I unrevert in git extensions?

share|improve this question

1 Answer 1

According to the Git Extensions Manual, a revert commit is just a new commit that undoes whatever commit you are reverting. So, you have a couple of options..

The non-destructive option would be to just revert the new commit that was created by your first revert.

Now, for the destructive option you can reset your branch to the previous commit using:

git reset --hard HEAD~1

This does a hard reset so any work in your tree may be lost. If you have pushed your original revert commit already the first option is definitely going to be the best option for you since the second is changing history.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.