Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to replace an eclipse project with latest version from head using EGit?

I have an eclipse workspace with a bunch of projects from git, I am using egit to manage the project. I typically try out experiments which fail, and I want to take a project and restore it to exactly its state in HEAD of the git repo.

How do I do that with EGit?

I have tried to right click on the project Replace With > Head Revision which causes eclipse to crash. I am new to git migrated from svn. is there an equivalent of svn revert for a project?

like image 715
ams Avatar asked Jun 06 '26 11:06

ams


1 Answers

If you don't have any non-versioned files (ie "private" files) that you don't want to lose, then you can try and reset your working tree to your current HEAD.

See "Resetting your current HEAD ", choosing the "hard" option.

like image 112
VonC Avatar answered Jun 08 '26 08:06

VonC