Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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


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.