I cloned a Git repository, which contains about five branches. However, when I do git branch I only see one of them:
git branch
$ git branch * master
Looping didn't seem to work for me and I wanted to ignore origin/master. Here's what worked for me.
git branch -r | grep -v HEAD | awk -F'/' '{print $2 " " $1"/"$2}' | xargs -L 1 git branch -f --track
After that:
git fetch --all git pull --all