Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Repository for multiple projects(Ho can I create a repository for an application consisting of 4 projects (EAR+EJB+EJB+JPA)?)
Repository for multiple projects [message #1689693] Tue, 24 March 2015 05:40 Go to next message
Luigi Cortese is currently offline Luigi CorteseFriend
Messages: 2
Registered: March 2015
Junior Member
I've created an Ear with EJB, JPA and Web modules associated. In my Project Explorer view, thus, I have this 4 projects and many others. I need to push my app to a github repository already created, so I select the 4 projects, right-click -> Team -> Share Project -> Git... and now?

When I have to push just one project, I usually

1 - create a local repository,
2 - commit on local,
3 - create remote (GitHub repository)
4 - push on remote

I don't think that repeating all these operations for every single project is the right way... Could you help me to understand and solve the problem?
Re: Repository for multiple projects [message #1690070 is a reply to message #1689693] Tue, 24 March 2015 23:17 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
When you selected multiple projects and clicked "Team > Share Project" you have 2 choices:
1. click "Use or create repository in parent folder of project"
- select the projects which should be versioned in this repository
- EGit will automatically determine which folder is the common parent folder containing the selected projects
- click "Create Repository" and "Finish"
- now both projects are now shared with the new repository and you can start committing changes
2. immediately click "Create Repository" and choose the folder where the repository should be created
- this folder can be anywhere on your disk, it will become the root of the working tree of the new repository
- the sharing dialog will now show the current location of all projects and the target path where they will be moved to
when you click finish
- if this looks good, click "Finish"
- EGit will move the projects to these target locations and connect them to the EGit team provider
- now you can start committing changes

There's a third option:
- manually put the new projects under a common root folder
- in Repositories view click "Create a new repository and add it to this view"
- select the folder which should become the root of the working tree of the new repository and click "Finish"
- start committing changes

By default projects are auto-shared with the EGit team provider if the respective repository is shown
in the repositories view. This option can be switched off in the preferences under "Team > Git > Projects"
Re: Repository for multiple projects [message #1690071 is a reply to message #1690070] Wed, 25 March 2015 01:26 Go to previous message
Luigi Cortese is currently offline Luigi CorteseFriend
Messages: 2
Registered: March 2015
Junior Member
I think I messed up a bit my workspace...

I tried starting from scratch:

1 - created three new projects: Foo (ear), FooEJB, FooWeb

2 - select onnly these three projects

3 - team -> share project -> git

index.php/fa/21303/0/

4 - click "create repository", then "Finish"

5 - select again ONLY these 3 projects, "team" -> "commit"

And now here I'm given a list of ALL files of ALL projects in my workspace, even not selected projects.

Is "option 2" the only way to prevent this, by moving the projects in another location? And if I'd prefer not to move the projects...? Am I missing something?
  • Attachment: 001.png
    (Size: 22.23KB, Downloaded 226 times)
  • Attachment: 002.png
    (Size: 5.09KB, Downloaded 181 times)
  • Attachment: 003.png
    (Size: 23.43KB, Downloaded 181 times)
  • Attachment: 004.png
    (Size: 25.78KB, Downloaded 210 times)
  • Attachment: 005.png
    (Size: 22.91KB, Downloaded 1235 times)

[Updated on: Wed, 25 March 2015 02:02]

Report message to a moderator

Previous Topic:How to push a specific commit to a remote repo
Next Topic:JGit clone fails with "Auth fail"
Goto Forum:
  


Current Time: Tue Apr 23 08:43:54 GMT 2024

Powered by FUDForum. Page generated in 0.03367 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top