dharma017
10/15/2015 - 9:55 AM

Clone all remote branches with Git - one liner bash command

Clone all remote branches with Git - one liner bash command

git branch -a | grep -v HEAD | perl -ne 'chomp($_); s|^\*?\s*||; if (m|(.+)/(.+)| && not $d{$2}) {print qq(git branch --track $2 $1/$2\n)} else {$d{$_}=1}' | csh -xfs