This content has been automatically translated from Ukrainian.
In Git, "origin" is the name of a standard alias that is used to refer to the remote repository from which a clone was made.
When cloning a repository from a remote server, Git automatically creates the alias "origin" that points to the URL of the remote repository. This alias is used for conveniently performing operations related to the remote repository, such as pulling changes, pushing changes, and getting information about the status of the remote repository.
For example, when you run the command git push origin master, you are sending changes from your local repository to the "master" branch on the remote repository that the alias "origin" points to.
You can use other alias names to refer to different remote repositories, but "origin" is standard and often used by default..
Using "origin" or any other alias is very convenient
If your repository URL:
https://github.com/company/coolreponame
the entry with the alias "origin" will be more convenient:
git push origin master
instead of
git push https://github.com/company/coolreponame master
And the ability to use other aliases adds flexibility to the development process. Different companies have their own repository configurations. And sometimes aliases will come in handy and save time.
This post doesn't have any additions from the author yet.