When you have created a github-repo and added the the github-repo as remote
git remote add origin https://github.com/githubname/reponame.git
then you need to push your first commit with
git push -u origin master
I read (Why do I need to do `--set-upstream` all the time?) that this a short form for doing
git branch --set-upstream-to my_branch origin/my_branch
git push
What is a upstream exactly and why do I need to set it? There is little information about this on the net. I know that there is a similar topic What does 'git remote add upstream' help achieve?, but in my opinion it does not explain exactly what the upstream is and what git push -u origin master
does, especially what is origin master
pointing to, is it the local repo or the remote repo?