I'm new to git and when I'm at work I would first branch off from the master branch and then start working, after finishing the work and then add and commit, after all of these I tried to push but sometimes I got the following message (sometimes not):
fatal: The current branch ql/live+my_branch has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin ql/live+my_branch
I know the problem will be solved by the above command but I was thinking when I branch off from the master branch then the master branch becomes the upstream branch of the current branch, why would I have to set it again? thanks in advance!