When I run:
git push origin branchname
What exactly is origin and why do I have to type it before the branch name?
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.
originis an alias on your system for a particular remote repository. It’s not actually a property of that repository.By doing
you’re saying to push to the
originrepository. There’s no requirement to name the remote repositoryorigin: in fact the same repository could have a different alias for another developer.Remotes are simply an alias that store the URL of repositories. You can see what URL belongs to each remote by using
In the
pushcommand, you can use remotes or you can simply use a URL directly. An example that uses the URL: