Reputation: 493
I want to know that if I only use git command :
git push
and if I use
git push origin master
then, what is the difference between them?
I am working on gitlab and i have developer access to the project I am working on. I am using windows command line.
Upvotes: 6
Views: 15975
Reputation: 1979
git push: works like git push "remote", where "remote" is the current branch’s remote (or origin, if no remote is configured for the current branch).
and
git push origin master: Find a ref that matches master in the source repository (most likely, it would find refs/heads/master), and update the same ref (e.g. refs/heads/master) in origin repository with it. If master did not exist remotely, it would be created.
Please refer this for more information: link
Upvotes: 2