vfclists vfclists -4 years ago 79
Git Question

Is the Git remote name origin only applied to one created by git clone?

Does Git only use the remote name origin for a repository which was created by cloning?

eg, say I create a repository, place it on a remote, and try to clone it again into the same directory, which one would Git name origin?

Answer Source

origin is the default name used by git clone, but you can use any other name when cloning:

--origin <name>
-o <name>

Instead of using the remote name origin to keep track of the upstream repository, use <name>.

If you don't, any time you clone a repo, that remote repo will be referenced by the default name origin.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download