git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Quick way to clone exactly one branch
@ 2009-05-20 20:45 Avery Pennarun
  2009-05-28 20:15 ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Avery Pennarun @ 2009-05-20 20:45 UTC (permalink / raw)
  To: Git Mailing List

Hi all,

Is there a quick alternative to the following?

   mkdir myproj
   cd myproj
   git init
   git fetch git://whatever master
   git checkout -b master FETCH_HEAD

Basically, the above is a lot like 'git clone' but only clones the
'master' branch.  For really big projects with lots of junk in other
branches, the above can save a lot of bandwidth.

Also, if I were using git clone, I would often use --reference above.
I'm kind of afraid of explaining to a newbie that they should add an
entry to .git/objects/info/alternates after step 3.

Am I missing something obvious?

Have fun,

Avery

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

end of thread, other threads:[~2009-05-28 20:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-20 20:45 Quick way to clone exactly one branch Avery Pennarun
2009-05-28 20:15 ` Jeff King
2009-05-28 20:26   ` Jakub Narebski
2009-05-28 20:32     ` Jeff King

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