Community
Participate
Working Groups
Build Identifier: 0.8.1 In the clone git source dialog, the cloned repository always defaults to origin. I propose that we externalise this feature on the Source Git Repository dialog, so that a value other than 'origin' can be chosen. For example, when I'm working on a set of projects, I will name the remote based on the site that I've cloned from rather than 'origin'; in EGit's case, I'll call it 'eclipse.org' and have a copy at 'github.com'. That makes it much easier to remember where I've come from (and where it's going to). For compatibility with git, having it as 'origin' might be a sensible value, but we could give a preference to default it to the host name of the url. Reproducible: Always
Alex, as far as I can see you can do this by specifing the remote name in the clone wizard. Is that the feature you're asking for? If yes, I think we can close this one.
(In reply to comment #0) > but we could give a preference to default it to the host name of the url. I would like that. Maybe just a push button or a check box that would change the field's text in the dialog?
This enhancement still applies to 0.11.
[Batch change] Remove passed Target Milestones If anyone on CC list is going to fix/implement this, feel free to assign a new, post-1.3/2.0, target milestone.
Hi All, I like to work on this enhancement and require some more information as well. If the git url is https://git.eclipse.org/c/, then the hostname that needs to be "eclipse.org" If the git url is like "https://github.com/zurb/joyride" then what should be taken as the remote name? Whether it should be the project name or the hostname( in this case it will be "github.com") Cheers, Raj
You really need to use the hostname (GitHub) and not the project name, since the project name could be in multiple remotes and/or known as different Git repository https://github.com/eclipse/cdt/ https://git.eclipse.org/c/cdt/org.eclipse.cdt.git/
Thanks Alex!!! Will proceed with by dev accordingly Cheers,Raj
Hi Alex, I have done the changes and pushed the patch in Gerrit for code review and below is the URL for the same. https://git.eclipse.org/r/#/c/43783/ Please review the code and functionality Cheers, Raj
neither host nor projectname is a good name in context of github. Here its the username that makes sense. It is much easier if the *actual* origin (i.e. the main repo) is referred to as origin and its peoples (or gerrit) forks that are referred to by a name. This is what things like the hub cli does and it makes things so much easier to deal with. You always know which is the true origin, and then everything else is referenced as having a unique user name. Thus I would suggest that at least if the url being cloned from is github then take the username/organization name as the second alternative.
As a counterpoint, I have the same username in bit bucket as well as github so that would be useless for my use case. The point of raising this bug is in a multi-hosted world it's useful to track which distinct host(s) the repository is associated with. If you have multiple repositories on github I can see the benefit of having different user ids but this is largely irrelevant in the case of cloning which is a single repository operation and doesn't affect subsequent remote repositories that you might push to.
yeah, these improvements doesn't really help if only done for clone, should also be possible when adding remotes.
actually just realized I never used git to do what corresponds to "git remote add" ...where is that feature actually ? I only see UI that wants me to mess around with refs which when using the CLI is not exposed by default at all.
I suggest moving the discussion of a different feature/enhancement request to its own bug. This is about cloning a new repository only.
(In reply to Max Rydahl Andersen from comment #12) > actually just realized I never used git to do what corresponds to "git > remote add" ...where is that feature actually ? select "Remotes" in "Repositories View" and click "Create Remote..."