git push origin HEAD:master
Git threw the below error when I tried simply git push
. So clearly this is because Git matches the local and remote branch while pushing commits. This is the push.default
behavior, you can find out more details here.
fatal: The upstream branch of your current branch does not match
the name of your current branch. To push to the upstream branch
on the remote, use
git push origin HEAD:<Branch_Name>
To push to the branch of the same name on the remote, use
git push origin <Branch_Name>
To choose either option permanently, see push.default in 'git help config'.