Explore Courses Blog Tutorials Interview Questions
0 votes
in DevOps and Agile by (19.4k points)

When I run:

git push origin branchname

What exactly is the origin and why do I have to type it before the branch name?

1 Answer

0 votes
by (27.5k points)

"origin" is noting just what you nicknamed your remote repository when you ran a command like this:

$ git remote add origin [email protected]:USERNAME/REPOSITORY-NAME.git

Now your Git knows that "origin" points to that specific repository. You could have named it "github" or "repo" or whatever you wanted.

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

29.3k questions

30.6k answers


104k users

Browse Categories