Does Git only use the remote name “origin” for a repository which was created by cloning?
For example, say I create a repository, placed it on a remote, and try to clone it again into the same directory, which one would Git name origin?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
2010:
originis the default name used bygit clone, but you can use any other name when cloning: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.