Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » manyrepos and eGit :: vs many remotes(Is it possible to have multiple repositories vs many remotes?)
manyrepos and eGit :: vs many remotes [message #1790183] Wed, 06 June 2018 15:26 Go to next message
Chuck Herrick is currently offline Chuck HerrickFriend
Messages: 9
Registered: July 2016
Junior Member
Using Eclipse (ODM Rule Designer) > Git Repository Exploring (Perspective) > Git Repositories (View) I have a single "Repository" set up with multiple "remotes" each of which points to a different TFS URL.
I had set out to designate a separate Repository for each TFS URL but I can find no "new Repository" feature in my Eclipse/eGit Repositories View.

Am I doing this right (using multiple "remotes")?
How will I be able to tell eGit that a code entity should go into the Git repository via which "remote"?

Better ideas gladly accepted.
Re: manyrepos and eGit :: vs many remotes [message #1790195 is a reply to message #1790183] Wed, 06 June 2018 19:25 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1121
Registered: July 2009
Senior Member
If those repositories are forks of each other using multiple remotes could make sense. If they are independent repositories with
unrelated versioned content then you should clone them as different repositories. Look at the toolbar of the repositories view,
it has the following buttons:
* "Add an existing local git repository": use this if you have already a clone of this repository on your disk, maybe you used native git to clone it
* "Clone a Git repository": that's what you will use most of the time if there is already a repository hosted on some git server and you want to clone it
* "Create a new Git repository": use that, well, to create a new repository on your local disk.

Using multiple remotes makes sense if there are multiple copies of the same Git repository hosted on some Git servers which may have different
versions of the same project. E.g. if you are contributing to some open source project hosted on Github you often don't have write access to
the Open Source project's git repository (if you are not a maintainer of that project). In that case you first fork the project on Github, this means
you clone it on the server. For your fork you'll have write access so you can push commits you want to contribute to a feature branch in your fork
and then create a Github pull request to propose this change to the upstream open source project. In that case you need 2 remotes, one referring
to your fork and one referring to the upstream open source project's repository. This enables you to e.g. fetch updates from the open source project
to your local clone and then push them to your fork in order to keep your fork in sync with the changes done in the upstream project.
Previous Topic:manyrepos and eGit :: vs many remotes
Next Topic:Google Cloud: Authentication impossible ?
Goto Forum:

Current Time: Tue Feb 18 20:08:59 GMT 2020

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

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

Back to the top