6

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.

2

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.