Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create new project from GIT repo using Eclipse EGit

Tags:

git

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.

like image 405
ddinchev Avatar asked Feb 08 '12 11:02

ddinchev


People also ask

How do I clone a Git repository EGit?

Cloning Repositories In order to checkout a remote project, you will have to clone its repository first. Open the Eclipse Import wizard (e.g. File => Import), select Git => Projects from Git and click Next. Select “URI” and click next. Now you will have to enter the repository's location and connection data.

How do I push a new project to existing Git repository in Eclipse?

Step 1: Open Eclipse IDE and right-click on the project you want to push and go to Team->share project. Step 2: It will add the project to the given repository as shown below: Step 3: Again right-click on the project and go to Team->commit.


1 Answers

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

like image 161
VonC Avatar answered Oct 21 '22 07:10

VonC