1

If I set more than one remote url on my local repository and then push my code, does that local setting transfer on the repo and can it be picked up when repo is cloned?

Johny Boy
  • 167
  • 1
  • 2
  • 9

1 Answers1

1

No, the config remains local and is not pushed to the upstreams repos referenced by the multiple remote.
Note that to push to multiple repos, you need multiple urls registered under one remote.

Which means a new clone will have by default only one remote (named 'origin')


As mentioned in the comments, the remote origin is set automatically by the git clone command to the url used by git clone.
It is a local setting, local to the cloned repo on your machine.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • And that origin will retain its url info set for it, or not, when cloned? – Johny Boy Sep 05 '15 at 09:18
  • 1
    @JohnDoe The origin is set automatically by the git clone command to the url used by git cloned. It is a local setting, local to the cloned repo on your machine. – VonC Sep 05 '15 at 09:19