what is the difference between :
git push origin HEAD: <name-of-remote-branch>
git push origin CURRENT_BRANCH_NAME
Is CURRENT_BRANCH_NAME the name of my local branch or the remote branch ?
what is the difference between :
git push origin HEAD: <name-of-remote-branch>
git push origin CURRENT_BRANCH_NAME
Is CURRENT_BRANCH_NAME the name of my local branch or the remote branch ?
From git help push
:
The format of a <refspec> ... [is] the source object <src>, followed by a colon :, followed by the destination ref <dst>.
Then:
missing :<dst> means to update the same ref as the <src>
i.e. git
will interpret git push origin CURRENT_BRANCH_NAME
as git push origin CURRENT_BRANCH_NAME:CURRENT_BRANCH_NAME
, assuming your git config is relatively standard.