Reputation: 6039
What is the effect of git push master
if I have multiple remotes?
Is it going to be equivalent to git push origin master
?
Upvotes: 0
Views: 26
Reputation: 816810
You will get an error because you likely don't have a repository with name "master". If you only pass a single argument, it is interpreted as the name of the remote repository, not the branch.
This is also evident from the man page:
git push ... [<repository> [<refspec>...]]
Upvotes: 2
Reputation: 241998
Use git push
only. If you set the upstream reference, it'll be pushed. Use git push -u
to set the upstream reference.
Upvotes: 1