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

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

From
Andreas Ericsson <ae@op5.se>
Date
Oct 11, 2007, 09:18 UTC
Message-ID
<470DEA6E.5020107@op5.se>
In-Reply-To
<011c01c80b85$a0d8d560$04ac10ac@Jocke>
Joakim Tjernlund wrote:
Show 37 quoted lines
>> -----Original Message-----
>> From: Linus Torvalds [mailto:torvalds@linux-foundation.org] 
>> Sent: den 10 oktober 2007 21:38
>> To: Joakim Tjernlund
>> Cc: git@vger.kernel.org
>> Subject: Re: [FEATURE REQUEST] git clone, just clone selected 
>> branches?
>>
>>
>>
>> On Wed, 10 Oct 2007, Joakim Tjernlund wrote:
>>> I know I can use git remote to do this, but it is a bit clumsy 
>>> when starting a new repo.
>> How about just
>>
>> 	git init
>> 	.. set up remote tracking info in .git/config ..
>> 	git fetch remote
>>
>> which should do what you want.
>>
>> 		Linus
> 
> From git remote man page:
>  o  Imitate git clone but track only selected branches
> 
>           $ mkdir project.git
>           $ cd project.git
>           $ git init
>           $ git remote add -f -t master -m master origin git://example.com/git.git/
>           $ git merge origin
> 
> yes, this does the trick too but that is more to type so I thought
> it would be simpler if I could just tell git clone which branches I want.
> Now, this isn't a killer feature to me so if you don't like it, I good
> with that too.
> 
Well, that's how git-clone should probably look, now that git-remote exists.
-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Previous: Joakim Tjernlund
Message 9 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.