Search code examples
eclipsegitegit

How to create new project from GIT repo using Eclipse EGit


I have added a new GIT repo (private github repo) to Eclipse EGit repo explorer. In the working directory, our team has many projects - some python, some C++, some PHP - they are in different sub-directories. I choose a dir with python project and from the context menu I select "Import" then complete the steps with "New Project Wizard". I choose new "PyDev" project and end up with new project that is empty - only Eclipse files like the .project inside.

I want to create a new python project with the contents of ~/git/repo - I don't want external other copy of the tree.


Solution

  • You could follow this tutorial, and share your project.

    Create Egit repo

    That would create a local Git repo, to which you can add your private GitHub repo as a remote.
    See also "Pushing a Local Repository to GitHub ".

    Select your new Eclipse project and click "Team" > "Push To" and enter "Your GitHub Clone URL" and your GitHub password (with the free GitHub accounts, do not enter a password but leave blank), leave the user as "git"

    push to GitHub repo