There are a lot of publications in the Internet on this subject like:
all of them does the job to some xtent, but they do not preserver the Git status of the project.
here I show a solution that will preserve this status:
exit from the Eclipse
make a copy of the
subfolder of the workspace folder
start the eclipse
( this will create new .metadata\.plugins\org.eclipse.core.resources\.projects\
exit from Eclipse
copy the content of .indexes folder from the original to the newly created .indexes folder
start Eclipse – the workspace will open niormaly and the project willbe rebuit.
The Git project status will be preserved