git-guide
git-guide copied to clipboard
"git push origin master" does not what the guide says it does
"git push origin master" does not push the current branch to the "master" branch in the "origin" remote.
It pushes the local branch of the specified name to either a remote branch of the same name, or an alternate name if it is specified with the
I think he's right.
E.g: You are in a local branch named testing
and do git push origin master
, you will push your commits from your master
, to the master
on the remote. Ignoring testing
at all.
That can introduce some confusion or bugs if misread.
$ git push REMOTE LOCALBRANCH:REMOTEBRANCH