Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
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.

Browse Categories

...