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 is
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 is
Am 7/19/2013 11:21, schrieb Allan Acheampong:
Something like 'git clone theRepo -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
Johannes Sixt j.s...@viscovery.net writes:
Am 7/19/2013 11:21, schrieb Allan Acheampong:
Something like 'git clone theRepo -createLocalBranchesForAllBranches'
Perhaps:
$ git clone theRepo
$ git fetch origin refs/heads/*:refs/heads/*
(untested). There may be ways to write the same
Ramkumar Ramachandra artag...@gmail.com 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
Allan Acheampong allanad...@gmail.com 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
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 body of a
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 list:
From: Junio C Hamano gits...@pobox.com
Sent: Friday, July 19, 2013 4:02 PM
Allan Acheampong allanad...@gmail.com 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,
Philip Oakley philipoak...@iee.org writes:
Allan Acheampong allanad...@gmail.com 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
10 matches
Mail list logo