Git will automatically create a branch for you, if you don't have one yourself but you do have a corresponding remote-tracking branch (note that a remote-tracking branch is not a branch!).
The problem here is not that you don't have a corresponding remote-tracking branch. The problem is that you have too many corresponding remote-tracking branches.
You told Git to get on to, or create if necessary, myBranch01
. There are three possible myBranch01
names it could use to create yours:
origin/myBranch01
upstram/myBranch01
upstream/myBranch01
The middle one is clearly due to a typo. But even if you delete the typo-ed remote, which takes away all those remote-tracking branches, you will still be left with two possible myBranch01
sources. Git won't know which one to use, so it will refuse to use either one.
The solution is to tell Git which one to use to create your branch. Once you have created your own branch, the other two remote-tracking branch names are much less important and it won't matter that there are two of them.
You can:
git checkout --track origin/myBranch01
to make your own myBranch01
from origin/myBranch01
, or:
git checkout --track upstream/myBranch01
to make your own myBranch01
from upstream/myBranch01
.
Which one of these you should use is a different question entirely (and one only you can answer).