Skip to main content



      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 01:40 Go to next message
Eclipse UserFriend
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 19:17 Go to previous messageGo to next message
Eclipse UserFriend
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] Tue, 24 March 2015 21:26 Go to previous message
Eclipse UserFriend
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 245 times)
  • Attachment: 002.png
    (Size: 5.09KB, Downloaded 203 times)
  • Attachment: 003.png
    (Size: 23.43KB, Downloaded 203 times)
  • Attachment: 004.png
    (Size: 25.78KB, Downloaded 230 times)
  • Attachment: 005.png
    (Size: 22.91KB, Downloaded 1275 times)

[Updated on: Tue, 24 March 2015 22:02] by 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 Jul 08 01:23:44 EDT 2025

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

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

Back to the top