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
Set alias: (based on the top answer)
git config --global alias.track-all-branches '!git fetch --all && for remote in `git branch -r`; do git branch --track ${remote#origin/} $remote; done && git fetch --all'
Now to track all the branches:
git track-all-branches