Re: Git Clone Parameter

2013-07-19 Thread Junio C Hamano
"Philip Oakley" writes: >> Allan Acheampong writes: >> >>> ... I'm new to git, but I found it very >>> confusing to understand the difference between "remote" , >>> "remotes". Is it in the cloned repo, or is it in a remote place? >>> If its local, why doesn't it get shown when I do 'git branch'

Re: Git Clone Parameter

2013-07-19 Thread Philip Oakley
From: "Junio C Hamano" Sent: Friday, July 19, 2013 4:02 PM Allan Acheampong writes: ... I'm new to git, but I found it very confusing to understand the difference between "remote" , "remotes". Is it in the cloned repo, or is it in a remote place? If its local, why doesn't it get shown when I

Re: Git Clone Parameter

2013-07-19 Thread Ramkumar Ramachandra
Junio C Hamano wrote: > git branch -t "$branchname" "origin/$branchname" A couple of notes here: 1. I use git branch -u personally. Why the -t variant? 2. Don't we auto-track? (or is that only on checkout) -- To unsubscribe from this list: send the line "unsubscribe git" in the bod

Re: Git Clone Parameter

2013-07-19 Thread Ramkumar Ramachandra
Junio C Hamano wrote: > 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. Right. xargs -n 1, git branch, and refname:short. -- To unsubscribe from this lis

Re: Git Clone Parameter

2013-07-19 Thread Junio C Hamano
Allan Acheampong writes: > ... I'm new to git, but I found it very > confusing to understand the difference between "remote" , > "remotes". Is it in the cloned repo, or is it in a remote place? > If its local, why doesn't it get shown when I do 'git branch' but > when I do 'git branch -a'. > ...

Re: Git Clone Parameter

2013-07-19 Thread Junio C Hamano
Johannes Sixt writes: > Am 7/19/2013 11:21, schrieb Allan Acheampong: >> Something like 'git clone -createLocalBranchesForAllBranches' > > Perhaps: > > $ git clone theRepo > $ git fetch origin refs/heads/*:refs/heads/* > > (untested). There may be ways to write the same shorter, but I've lost >

Re: Git Clone Parameter

2013-07-19 Thread Junio C Hamano
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 unteste

Re: Git Clone Parameter

2013-07-19 Thread Johannes Sixt
Am 7/19/2013 11:21, schrieb Allan Acheampong: > Something like 'git clone -createLocalBranchesForAllBranches' Perhaps: $ git clone theRepo $ git fetch origin refs/heads/*:refs/heads/* (untested). There may be ways to write the same shorter, but I've lost track of what is and what is not possibl

Re: Git Clone Parameter

2013-07-19 Thread Ramkumar Ramachandra
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) Do you see what the problem i

Git Clone Parameter

2013-07-19 Thread Allan Acheampong
Hi, it would be nice to have a parameter on 'git clone' that not only clones the repo, but also creates local branches for ALL the branches that are in the repo. I'm new to git, but I found it very confusing to understand the difference between "remote" , "remotes". Is it in the cloned repo, or