0 votes
1 view
in Devops and Agile by (20k 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 (28.4k 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 !


Categories

...