* clone
@ 2009-07-20 14:33 Roald de Vries
2009-07-20 15:24 ` clone Jeff King
2009-07-21 8:05 ` clone Michael J Gruber
0 siblings, 2 replies; 4+ messages in thread
From: Roald de Vries @ 2009-07-20 14:33 UTC (permalink / raw)
To: git
Dear all,
If I clone a repository with multiple branches to 'newdir', and then
type 'git branch' in 'newdir', I see only 1 branch. 'git branch -r'
gives me all branches. Is that correct behaviour? If so, why? And
mainly: can I configure git to clone all original branches to non-
remote branches?
Kind regards, Roald
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: clone
2009-07-20 14:33 clone Roald de Vries
@ 2009-07-20 15:24 ` Jeff King
2009-07-21 8:05 ` clone Michael J Gruber
1 sibling, 0 replies; 4+ messages in thread
From: Jeff King @ 2009-07-20 15:24 UTC (permalink / raw)
To: Roald de Vries; +Cc: git
On Mon, Jul 20, 2009 at 04:33:51PM +0200, Roald de Vries wrote:
> If I clone a repository with multiple branches to 'newdir', and then
> type 'git branch' in 'newdir', I see only 1 branch. 'git branch -r'
> gives me all branches. Is that correct behaviour? If so, why? And
> mainly: can I configure git to clone all original branches to non-
> remote branches?
Yes, it's correct. You really only need local branches of things you are
going to work on. And then that happens, you generally would just "git
checkout -b foo origin/foo" to make your own local "foo" branch that you
will be working on (or if you are using topic branches, something more
like "git checkout -b mytopic origin/master"). If you are just
inspecting branches (e.g., checking them out to try building, doing
diffs against them, using them as reference points for logging, etc),
then the remote versions are fine.
-Peff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: clone
2009-07-20 14:33 clone Roald de Vries
2009-07-20 15:24 ` clone Jeff King
@ 2009-07-21 8:05 ` Michael J Gruber
2009-07-21 9:56 ` clone Roald de Vries
1 sibling, 1 reply; 4+ messages in thread
From: Michael J Gruber @ 2009-07-21 8:05 UTC (permalink / raw)
To: Roald de Vries; +Cc: git
Roald de Vries venit, vidit, dixit 20.07.2009 16:33:
> Dear all,
>
> If I clone a repository with multiple branches to 'newdir', and then
> type 'git branch' in 'newdir', I see only 1 branch. 'git branch -r'
> gives me all branches. Is that correct behaviour? If so, why? And
> mainly: can I configure git to clone all original branches to non-
> remote branches?
>
> Kind regards, Roald
A for the 2nd part (1st one answered by Jeff), you can "git clone --mirror".
But me suspects that you actually want (s)cp -rp, do you?
Michael
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: clone
2009-07-21 8:05 ` clone Michael J Gruber
@ 2009-07-21 9:56 ` Roald de Vries
0 siblings, 0 replies; 4+ messages in thread
From: Roald de Vries @ 2009-07-21 9:56 UTC (permalink / raw)
To: Michael J Gruber; +Cc: git
Hi Michael,
I actually meant cloning all branches to both remote and non-remote
(but remote-tracking) branches. But still, the --mirrorring is
usefull, thx.
Kind regards, Roald
On Jul 21, 2009, at 10:05 AM, Michael J Gruber wrote:
> Roald de Vries venit, vidit, dixit 20.07.2009 16:33:
>> Dear all,
>>
>> If I clone a repository with multiple branches to 'newdir', and then
>> type 'git branch' in 'newdir', I see only 1 branch. 'git branch -r'
>> gives me all branches. Is that correct behaviour? If so, why? And
>> mainly: can I configure git to clone all original branches to non-
>> remote branches?
>>
>> Kind regards, Roald
>
> A for the 2nd part (1st one answered by Jeff), you can "git clone --
> mirror".
>
> But me suspects that you actually want (s)cp -rp, do you?
>
> Michael
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-07-21 9:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-20 14:33 clone Roald de Vries
2009-07-20 15:24 ` clone Jeff King
2009-07-21 8:05 ` clone Michael J Gruber
2009-07-21 9:56 ` clone Roald de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).