Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EGit - "Replace With Commit..." doesn't work as excepted

I'm using EGit with Eclipse Indigo SR 2 Build 20120216-1857.

Almost everything works well, except the Replace With -> Commit... function. In fact it works, but doesn't restore the project exactly like it was because it left the new files that I added since.

It looks like it does a kind of a mix between current HEAD and the commit I choose to restore. What I really want is to replace the content of my project with a previous commit like it does when you switch between branches.

Is there any solution ? And does anyone knows if the lastest version of Eclipse provide a fully working version of EGit ?

Or am I misunderstanding this feature ?

like image 201
flawyte Avatar asked May 21 '26 03:05

flawyte


1 Answers

@VonC pointed me towards one solution but that's not really what I want.

I tried the Reset command but first, I had to tag the commit to be able to choose it. Then it changes the whole master branch and canceled the next commits. In fact I don't want to change any branch or to delete any commits, I just want to be able to return to a previous one to see the whole code and eventually run it.

Finally I could have it to work using Checkout on the commit. To see all the commits : Right click on your project -> Show In -> History

It will not modify any branch your were working on but just replace the content of your project by the one the commit has saved.

like image 96
flawyte Avatar answered May 23 '26 20:05

flawyte