bogdanrada
3/17/2015 - 12:31 PM

git-copy-remote-branches-to-local-branches

git-copy-remote-branches-to-local-branches

#!/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




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