1

Does git push origin master do exactly the same thing as git push?

0

1 Answer 1

5

git push alone has been deprecated (not supported) for some time, because it is implicit, rather than explicit.

It is better practice, and not to mention much safer (will likely stop you from accidentally pushing the wrong branch to the wrong remote).

Thus, it is best to use git push <remote> <branch>

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

6 Comments

Okay but was it the same thing before been deprecated ?
and git pull without arguments is deprecated too ?
AFAIK, git push pushed the currently checked-out branch to the origin remote. So, if git status said you were in the master branch, and git remote -v returned the remote origin, then git push would be the same as git push origin master
Yes I believe git pull without any arguments is also deprecated.
@RThomP Can you provide a reference for deprecation? I've never heard about deprecated bare git pull/push, docs don't say anything and search reveals nothing.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.