git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* is this behaviour expected for "git clone --single-branch"?
@ 2012-09-13 18:38 Ralf Thielow
  2012-09-13 18:45 ` Junio C Hamano
  0 siblings, 1 reply; 39+ messages in thread
From: Ralf Thielow @ 2012-09-13 18:38 UTC (permalink / raw)
  To: git; +Cc: pclouds, Junio C Hamano

Hi,

I know people which have a separate directory for every
branch. In this case it doesn't make sense to download
the whole repo with all branches. So I guess the
"--single-branch" option is the solution in that case!?!
But I'm wondering about it's behaviour.

# first clone the branch of the repo
$git clone --single-branch --branch master myrepo ./master
$cd master

# now calling "git branch -a" to see what I have
$git branch -a
*master
remotes/origin/HEAD -> origin/master
remotes/origin/master

# fine, now pulling from origin
$git pull
From myrepo
* [new branch]  foo  -> origin/foo
* [new branch] bar -> origin/bar
...

Hm?

# looking again to my branches
$git branch -a
*master
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/origin/bar
remotes/origin/foo
...

After cloning (or fetching), I now have all branches which is not
what I want, because I'm only interested in the one I've cloned.
I think it's not very useful for the use-case of having one directory
for one branch.

$git version
git version 1.7.12.395.g6b149ce

Thanks

^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2012-09-20 21:17 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-13 18:38 is this behaviour expected for "git clone --single-branch"? Ralf Thielow
2012-09-13 18:45 ` Junio C Hamano
2012-09-13 18:48   ` Ralf Thielow
2012-09-14  5:09     ` [PATCH] clone: fix refspec on "--single-branch" option Ralf Thielow
2012-09-14  5:35       ` Junio C Hamano
2012-09-14  6:48         ` Junio C Hamano
2012-09-14 13:10           ` Nguyen Thai Ngoc Duy
2012-09-14 14:25             ` Ralf Thielow
2012-09-14 16:02             ` Junio C Hamano
2012-09-14 18:11           ` [PATCHv2] " Ralf Thielow
2012-09-14 19:22             ` Junio C Hamano
2012-09-14 21:13               ` [PATCHv3] " Ralf Thielow
2012-09-14 22:45                 ` Junio C Hamano
2012-09-16  8:13                   ` [PATCHv4] clone --single: limit the fetch refspec to fetched branch Ralf Thielow
2012-09-17  4:48                     ` Junio C Hamano
2012-09-17 12:06                     ` Nguyen Thai Ngoc Duy
2012-09-17 12:11                       ` Nguyen Thai Ngoc Duy
2012-09-17 19:21                         ` [PATCHv5] " Ralf Thielow
2012-09-17 20:18                           ` Junio C Hamano
2012-09-17 21:04                             ` Ralf Thielow
2012-09-17 21:39                               ` Junio C Hamano
2012-09-18 14:08                                 ` Ralf Thielow
2012-09-18 16:57                                   ` Junio C Hamano
2012-09-18 19:14                           ` [PATCHv6] " Ralf Thielow
2012-09-18 19:42                             ` Junio C Hamano
2012-09-18 19:45                             ` Junio C Hamano
2012-09-19 16:45                               ` [PATCHv7] " Ralf Thielow
2012-09-19 23:26                                 ` Junio C Hamano
2012-09-20 18:04                                   ` [PATCHv8] " Ralf Thielow
2012-09-20 21:17                                     ` Junio C Hamano
2012-09-19  7:36                             ` [PATCHv6] " Nguyen Thai Ngoc Duy
2012-09-19  8:24                               ` Ralf Thielow
2012-09-17 20:09                         ` [PATCHv4] " Junio C Hamano
2012-09-18  1:04                           ` Nguyen Thai Ngoc Duy
2012-09-18  3:56                             ` Junio C Hamano
2012-09-17 13:25                       ` Ralf Thielow
2012-09-17 20:08                       ` Junio C Hamano
2012-09-18  1:02                         ` Nguyen Thai Ngoc Duy
2012-09-14 18:42           ` [PATCH] clone: fix refspec on "--single-branch" option Junio C Hamano

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).