Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git revert in Egit

Tags:

git

eclipse

egit

Is it possible to do "git revert"s in Egit to rollback changes by creating a new commit (as opposed to checking out an older commit or doing a hard reset which doesn't create a new commit rolling back the changes)?

This seems like an important feature if you have a central repository in case you ever need to undo changes that has already been pushed there.

Thanks in advance!

like image 665
Christian Avatar asked Jan 07 '11 16:01

Christian


People also ask

How do I Uncommit a file in eclipse?

One work round is to select the file, right click > replace with > local history... Then finally do a new commit that is effectively undoing the change you made, if you have to.


1 Answers

  • install latest nightly of EGit (0.11.xx)
  • open History View
  • right-click on the commit you want to revert in the currently checked out branch
  • click "Revert Commit"

-- Matthias

like image 109
Matthias Sohn Avatar answered Oct 13 '22 22:10

Matthias Sohn