From: Junio C Hamano Date: Fri, 19 Jul 2013 15:05:06 GMT Subject: Re: Git Clone Parameter Message-ID: <7vvc46y4il.fsf@alter.siamese.dyndns.org> In-Reply-To: Ramkumar Ramachandra writes: > Allan Acheampong wrote: >> I could write a script with for each in but thats way too much hassle > > $ git for-each-ref --format="%(refname)" refs/remotes/origin/ | sed > 's/refs\/remotes\/origin\///;/HEAD\|master/d' | xargs git checkout -b > > (completely untested ofcourse) You would at least need "xargs -n 1" for the produced command line to make any sense, and it is wasteful to actually check out each and every branch to the working tree only to create it.