When I clone a project from Github to Eclipse I get two cloned projects in eclipse with different organization although they seem to have the same content, I do not understand what is happening.
Eclipse:
Github:
the project has Maven implemented, it is possible that it is part of the bug
I want to have a single proyect as it appears in GitHub
Related
I am new to Git and was exploring the Git integration in Eclipse, IntelliJ, and Pycharm. In Eclipse, the way projects get exported seems to be that the project gets added to an existing repo, while in IntelliJ and PyCharm, the project's root directory itself becomes a Git repo. This approach made the most sense to me, but then again I don't have much experience in sharing code. This latter approach is also possible in Eclipse by clicking the "Use or create repository in parent folder of project" checkbox, but when I did so, Eclipse told me that using the parent folder was not recommended.
Now for my question: Why does Eclipse warn against doing precisely what JetBrains IDE's do by default? What are the dangers in using a project's parent folder as a Git repo?
I read online that it has to do with the fact that once the parent folder is created as a repo, you can't add any new projects to the repo. But what are the benefits of adding projects to existing repos vs just making a separate repo for each project to keep everything separate?
after a couple of hours trying and reading a number of tutorials, I can't fix the following problem: I have a remote server running a git repository. From eclipse (neon.2 and egit) I pushed several maven projects, each with its own pom.xml to this repository. When a friend of mine, who wants to co-develop tries to setup his environment, also using Eclipse Neon.2 and egit, we are not able to reproduce the setup in the Package Explorer. We get all the sources but in one project. The original maven projects are all nested in this one project. This wrong setup results in a couple of problems when trying to compile or run the projects.
We used File-> Import-> Git-> Projects from Git-> Clone URI. In Source Git Repository we pointed the Repository path to /home/git/workspace.git. In the Branch Selection dialog we can then only see the master. In the following Local Destination dialog we checked the Clone submodules checkbox. We played around with the following options to run wizards which were all failing, so we ended up with this one project option in the bottom of the three options in the dialog.
What is not happening, is the import projects dialog as explained here https://wiki.eclipse.org/EGit/User_Guide/Remote#Import_Projects
(but this seems to be a former version, since the Clone submodules checkbox is missing in the dialog before on this web page)
Can anybody please tell us how to extract the maven projects as top elements in eclipse, linked to the existing git repository, such that we can work as a team?
Should you need any additional information, please let me know.
Thank you in advance.
I would advise you to always put all Eclipse configuration files to the repository when creating projects. What you should do is add all necessary maven integration related files to the repository (.project, .classpath, .settings/*m2e.core.prefs or better yet entire .settings). If you have done so, you are fine. If not, add them and pull changes on your colleague's machine.
On target machine remove the project from workspace, but do not delete contents. In Eclipse Git repositories view select your repository and expand to see Working tree. Right click it and select Import projects. This will trigger the flow you pointed our at Eclipse wiki. From there it should be straightforward - Eclipse will try to detect projects and will import them, so that they have Maven nature and are managed by EGit.
If you don't want to or cannot share maven configuration in the repository, have a look at this answer which tries to describe how to achieve that without Eclipse configuration files.
I am pretty new to GitHub.
This is my problem: We (4 people) are working on a Java project. Two of us are using NetBeans and two of us are using Eclipse. Let`s say 1 person created a project from Eclipse and pushed the project into the repository. Now, I want to clone the repository and work on the project. I can successfully clone the project and I can see all the files that we have in the repository. However, I cannot run the project. In fact, when I am cloning the project, NetBeans asks me for creating a new project. I do not want to create a new project but I want to work on the same project that I am able to run it.
What is solution?
I recommend to commit the Eclipse project meta-files (.project, .classpath and may be the .settings directory) and the NetBeans project meta-files (I don't know the corresponding meta-file names for NetBeans).
From your problem description it seems the NetBeans project meta-files are missing in the github repository. Hence, NetBeans doesn't recognize the cloned repository as a project.
See also: Which NetBeans projects files should go into source control?.
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.
I'm part of a team working on a game project and we just moved our project to using Gradle. I can pull, commit, merge and push normally with Git GUI in Windows Explorer, but other members of the team can also pull in Eclipse by right-clicking the Gradle-project folder in Project Explorer view, choosing Team-menu and then Pull. However, in my Eclipse the "Team" settings only give me options to "Apply Patch" and "Share Project.." the whole team has tried to find a solution for this to no avail so far.
Before the project was built on Gradle, I was also able to pull in Eclipse by using the aforementioned method. We're using Git repository.
Any suggestions on where to look for the cause of this malfunction?
Thank you.
I assume then you don't store the Eclipse project files/settings in your Git repository but create them locally using gradle eclipse.
Then after importing the project into Eclipse (be sure not to copy it to the workspace) you can use the Share project... option under Team in the context menu. Then choose Git. Eclipse EGit will automatically detect if your project resides in an existing repository (it should be listed on the next wizard page) and set up the corresponding association.
The term Share project maybe is a bit confusing, as you also do it for projects that already are under version control.