I already have an existing project in Eclipse that I want to add to my team’s github repo. The github repo is empty right now. What’s the best way to add this project to our github repo? I was thinking of git cloneing our repo into the workspace folder (parent to the project in question) and then adding the project files using git add, then pushing the changes. Would that work, or is there a better way to do this (perhaps with EGit)?
I already have an existing project in Eclipse that I want to add to
Share
You have to add a remote to the project, and then push to it.
For example, you can do (from inside the project directory)
there should be a way to do that from the eclipse plugin too, but I find it easiear to do it from the command line.. 🙂
By the way, remember to add all the IDE-specific files to
.gitignore, to avoid pushing garbage to the world: they usually are.project,.classpathand directories likebin/*,.settings/*…