I\'m trying to push one of my projects to github, and I keep getting this error:
fatal: The current branch master has no upstream branch.
I\'ve
Some people coming to this page may simply have this error because they did git push origin
and simply didn't realise that you need to specify the remote branch name as well, as in git push origin master
.
If you do git branch --set-upstream-to=origin/master master
a reference is added to .git\config to link the local and remote branches. I presume that then you no longer need to specify the branch name when pushing to the remote.