jruzafa
11/27/2012 - 11:39 AM

git clone all remote branches locally

git clone all remote branches locally

#!/bin/bash
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do
   git branch --track ${branch#remotes/origin/} $branch
done