git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: [FEATURE REQUEST] git clone, just clone selected branches?

From
JTJoakim Tjernlund <joakim.tjernlund@transmode.se>
Date
Oct 10, 2007, 21:25 UTC
Message-ID
<011b01c80b84$222d1e70$04ac10ac@Jocke>
In-Reply-To
<Pine.LNX.4.64.0710102032330.4174@racer.site>
Show 40 quoted lines
> -----Original Message-----
> From: Johannes Schindelin [mailto:Johannes.Schindelin@gmx.de] 
> Sent: den 10 oktober 2007 21:35
> To: Joakim Tjernlund
> Cc: git@vger.kernel.org
> Subject: Re: [FEATURE REQUEST] git clone, just clone selected 
> branches?
> 
> Hi,
> 
> On Wed, 10 Oct 2007, Joakim Tjernlund wrote:
> 
> > To my knowlede a git clone always clones all branches from 
> the remote 
> > repo. I would like the possibly to clone selected branches, like
> >  git clone <repo URL> -b master -b upstream
> > which will only fetch the master and upstream branch.
> > 
> > I know I can use git remote to do this, but it is a bit clumsy when 
> > starting a new repo.
> 
> This is why I suggest: since it is an itch of yours, just fix 
> it.  You are 
> in the prime position to know when you're satisfied.
> 
> As a hint how to start: Junio dreamt of a git-clone which is a tiny 
> wrapper around git-fetch and git-remote.
> 
> So you could start by writing a script which would be a 
> replacement for 
> git-clone.sh, and there you can also include the support for 
> -b that you 
> would like so much.
> 
> It would be nice, though, to keep this in separate patches, 
> which you then 
> submit to this list.
> 
> Thank you,
> Dscho

Thank you for these words of visdom, I should know better than to throw out ideas like this. Next time I have an suggestion I will think long and hard about it before posting again.

 Jocke 
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 3 of 9 in “[FEATURE REQUEST] git clone, just clone selected branches?”
  1. Joakim TjernlundOct 10, 2007
  2. Johannes SchindelinOct 10, 2007
  3. Joakim TjernlundOct 10, 2007
  4. Johannes SchindelinOct 10, 2007
  5. Joakim TjernlundOct 10, 2007
  6. Johannes SchindelinOct 10, 2007
  7. Linus TorvaldsOct 10, 2007
  8. Joakim TjernlundOct 10, 2007
  9. Andreas EricssonOct 11, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.