First of all clone a git repo to a local directory.
git clone [email protected]:username/repo.git localFolder
Now run this bash script in your terminal
#!/bin/bash for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do git branch --track ${branch##*/} $branch done
All done, have fun with your repo now :)