I have a number of projects using git for version control. Some are python modules others are C++ projects developed using Xcode4. However, I seemed to be struggling to import the project via git. I can easily import the actual source directories.
I tried doing the following:
1)I add my git repositories to the Egit repository browser.
2) Right click on the repository and click import project ...
3) Create the appropriate project
At this stage there is no source code in the project. I feel like I am missing a step somewhere.
Eclipse has a git plugin: http://eclipse.org/egit/
Just install EGit and import the actual source code directories. Then you can edit the source code in Eclipse, and use the Eclipse team provider interface to access version control facilities, and you're operating out of the same git repositories as you always were.
Related
How to properly import projects from BitBucket or another cloud repository? I have Eclipse Neon JavaEE. Even if there is Git preinstalled yet and (for my purposes important) Maven too. The imported projects are not real projects.
The straighforward way is:
File -> Import -> Git -> Clone URI (copied from repository i.e.
BitBucket)
Fill in username/password if needed
Next
Now I can see this picture (Ubuntu Linux 16.04)
But no any from this options clone huge of projects properly.
To successful clone projects I must in this moment
Cancel process (cloning is in local repository yet)
and manually add projects one after another one into workspace in Git Perspective on expanded Working tree using
Right click on projects -> Import Projects...
Do you know anybody how do this operation better?
Next another thing is, that I cannot select more projects, because the option Import Projects... will disappear.
Another approach is to:
clone those repositories manually in command-line (with a Git you install yourself, separately from the one used by Eclipse).
Clone those repo in any path you want, outside of the Eclipse workspace folder.
import the project you want into the Eclipse workspace, by using the local path where the Git repo has just been cloned.
once imported, select the Team/share option by right-clicking on the imported project in Eclipse: it should recognized the project is already shared as a Git repo.
That wy, you don't try to do everything with Eclipse in one Go: you separate and keep better control on each step (clone, import, share)
I have an Eclipse workspace in ~/EclipseWorkspaces/Sabia with a number of projects under Ubuntu 15.10. The source code for these projects resides in a Git repository at ~/GitRepositories/Sabia.
I can find no way to tell Eclipse in the Pydev Package Explorer that the projects use the Git Repository. If I try to use Team->Share, the system rejects the Git repository because a directory for each project exists in the repository and Eclipse is trying to move the project to the repository which already has a project directory.
I tried the suggestion by Michal Grzejszczak but unfortunately it does not work because the Git Repository does not contain complete projects, only the source trees for the projects. The Eclipse metadata is in /EclipseWorkspaces, not in the Git Repository so import projects on the Git Repository perspective does not work.
In addition when I tried to delete the projects I got the following error message:
AppFrame (One of my projects) contains resources that are not in sync with /home/jonathan/Dropbox/EclipseWorkspaces/Sabia/AppFrame. Press 'Continue' to force delete`
for half of my projects.
Unfortunately the message gives no more information and I have no idea what kind of problem might actually exist. I am not prepared to delete any flawed projects until I have corrected whatever was wrong.
How can I tell the Eclipse Pydev Package Explorer where the Git repository resides?
You need to first add this repository to Git repositories view in Eclipse. Then remove these project from workspace, but without deleting contents and then the most crucial part import them back with "Import projects..." from context menu after right clicking Working tree of the repo in Git repositories view.
That should make your projects managed by Git.
the title says most of it. I also checked the "Import all existing Eclipse projects after clone finishes". I am starting to learn github. Please help me and make this a pleasent start so I actually keep using it. The repo folder that I had to choose for the repo is not in my eclipse workspace. I thought I don't need to manually import the projects in the repo if I check that checkbox. I use eclipse Mars and EGit.
Edit: I created a new repository before on GitHub. I imported a test project into my repository to play around with it and test stuff. Thats all whats in the repository.
Thats what my GitHub repo looks like on the website:
Apprecciate your help.
Eclipse will only import Eclipse projects. So if you have some plain Java projects (without Eclipse specific meta data) or even just plain folders in your repository, those will not be imported. However, you can import all such non Eclipse artifacts into Eclipse projects by using the "Import -> General" wizard category.
And in case your projects are Eclipse projects, you can re-try the import from the locally cloned repository into your workspace by using the "Import projects" menu on the repository in the repository view of Eclipse.
just created project on github from my office and when then i came home and was trying to import the project on my home machine but I am not able to do it.
Following is the detail.
Both home and office machine has eclipse Juno and Egit plugin installed. I am able to do check-in from office. but at home I am not even able to import the project.
my workspace directory - c:\gaurang
git local directory - d:\Gaurang\Webdriver-Data-Driven-Framework
Now if i choose "Import existing projects" it says No project found
if i choose "Use the new Project Wizard" - it creates empty project
if i choose "Import as general project" - it creates the project but not a java project so not able to compile or run.
My git repository - https://github.com/Gaurang033/Webdriver-Data-Driven-Framework.git
I struggled in a similar fashion when checking out https://github.com/angular/angular-seed.git
The problem was that I expected to happen in a single step. The Github project does not contain eclipse files, so of course you can not import existing projects - the other options should work, however and they don't
The solution for me was to:
Clone the github repository locally e.g. /home/name/git/angular-seed (import.../Projects from Git/URI)
Obtain a working copy as a plain project (import.../Projects from Git/local)
I think it's a bug
The result is that I have the cloned repository in /home/name/git/angular-seed and a skeleton project with a ".project" file that points to that place
You have to push your .project and .classpath files to the repository if you want to be able to import the project using the "Import existing projects" wizard. If those are not present, eclipse cannot detect an existing java project.
I have a maven project. I've been using the command line to perform git operations. (I ran git init inside the project so there is a .git subdir in it)
I push it to a bare repository from which I sync via various computers.
One project, one repository; just like thousands of repos on github.
I decided to try egit to manage git from Eclipse even though the command line works just fine.
Ok, right click on the maven project, Team->Share Project, Choose Git, next.
I don't want to create or use a repository in the parent folder - or create one; it already is a repository.
Import Git project barfs on bare repositories, so I can't just "go to the source".
What is the simplest way to import an existing git project?
(I guess, cd to a working dir, clone the bare repo, add that to eclipse as a repo, then import from there - but make certain your run mvn eclipse:eclipse first since git's import isn't as kind and the maven project import.)
eGit is not intended to work with bare repositories but to make Eclipse aware of the fact that the various files in the workspace have a VCS behind them and to reimplement enough of the git functionality in pure Java for this to work without a native client.
Therefore clone your repository, and work with the clone. I have found that these steps work well with m2e.
clone the repository
File -> Import -> Existing Maven projects
After the import finishes and the dependencies downloaded, use right-click Team -> Share on all projects, choose Git, and check the topmost checkbox so it looks for .git.