fireflieslive fireflieslive - 1 year ago 102
Git Question

Why is git remote named 'origin' by majority?

I always rename my remote as github or bitbucket . I'm curious why the default name is origin, IMHO the name origin fits when cloning a repo, but seems not when adding it to your existing repo. Or am I just missing something

Answer Source

Because the only way a remote "automatically" enters git is through a git clone, and here, "origin" is perfectly suitable. This probably also is the usual, 99% of the time way how remotes are created.

So people are used to "origin"; it will often be the term used in documentation/tutorials etc. . Hence, people tend to view "origin" as the default name of remote, or even as a special remote (which it is not, obviously).

The same goes for "master" - I'm sure many think "master" is a special branch when it absolutely is not; except from getting some special treatment during git clone and git init, it is a totally normal branch which can be deleted etc.

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