I have worked on an Android project for which I’ve used versioning locally and on GitHub. Now I decided to use Eclipse’ Refactor > Rename… to give the project a more suitable name. To my surprise, Eclipse silently removed all connections between the project and the git repo.
Now what…? I cannot even commit locally, let alone push to github…
I’m far from fully versed in git and I had some problems getting Eclipse and git agree with each other (http://stackoverflow.com/questions/8756006/eclipse-egit-push-to-remote-menu-choice-is-grayed-out), but at least it worked (but I cannot remember exactly how I got it to work), and I can see all my commits pushed to the hub, but how can I restore the connection so I don’t mess up the versioning?
To summarize the comments above, one workaround, when the project within an Eclipse workspace doesn’t behave properly, would be to:
Eclipse should detect again the
.gitdirectory within that project and consider it under version control.