To fetch remote refs locally.

git fetch –all

git fetch, downloads the remote refs. to your local repo.

If you need to set up local branches tracking remote branches, the following snippet would help.

Assuming only one remote called ‘origin’, the following snippet would create local branches for all remote tracking ones.

for b in `git branch -r | grep -v -- '->'`; do git branch --track ${b##origin/} $b; done