All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Avery Pennarun <apenwarr@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: Quick way to clone exactly one branch
Date: Thu, 28 May 2009 13:26:05 -0700 (PDT)	[thread overview]
Message-ID: <m3ljohas9x.fsf@localhost.localdomain> (raw)
In-Reply-To: <20090528201503.GL13499@coredump.intra.peff.net>

Jeff King <peff@peff.net> writes:

> On Wed, May 20, 2009 at 04:45:44PM -0400, Avery Pennarun wrote:
> 
> > 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.
> 
> No, AFAIK there isn't a simpler way to do it. But it is something people
> have asked about before, so I think it would be a nice addition.
> 
> You can't even use "git remote" because it doesn't allow you to tweak
> the refspecs you add. [...]

It doesn't? Strange, I thought that is what '-t <branch>' option
for "git remote add" for ;-))))

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2009-05-28 20:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2009-05-28 20:32     ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3ljohas9x.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=apenwarr@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.