Does `git` name only as “origin” any remote upon cloning?

2010: 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.


With Git 2.30 (Q1 2021, 11 years later), you now have the option clone.defaultRemoteName.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)