My problem is related to Fatal Git error when switching branch.
I try to fetch a remote branch with the command
git checkout -b local-name origin/rem
It's not very intuitive but this works well for me ...
mkdir remote.git & cd remote.git & git init git remote add origin $REPO git fetch origin $BRANCH:refs/remotes/origin/$BRANCH
THEN run the git branch --track command ...
git branch --track $BRANCH origin/$BRANCH