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

Re: git-branch, older repos and more confusion

From
Sam Vilain <sam@vilain.net>
Date
Apr 12, 2007, 04:54 UTC
Message-ID
<461DBBA0.3070609@vilain.net>
In-Reply-To
<20070412042308.GA22539@coredump.intra.peff.net>
Jeff King wrote:
Show 15 quoted lines
>> Alas - I think support for it seems to be going the away... what I am
>> missing is a clear way to say git-clone <repo>#branch that has the
>> same properties that `cg-clone <repo>#branch` has. Namely, once you
>> are done, there are clear names for your "local tip" and "remote tip",
>> and push and pull do the right thing without extra params.
>>     
>
> I don't think there is a way to clone _just_ that branch, but if you're
> OK with fetching all of the branches, then you should be able to do
> just:
>
> git-clone <repo>
> git-branch --track branch origin/branch
> git-checkout branch
>   
You can;
 mkdir moodle
 cd moodle
 git-init
 git-remote add -t mdl-topnz -f origin \
    git://git.catalyst.net.nz/moodle.git
But yes, not as easy as "cg-clone git://...#branch"

I sent a patch for 'git remote prune -c' recently that would help in the transition between the two remotes formats.

Sam.
Previous: Jeff KingNext: Martin Langhoff
Message 3 of 9 in “git-branch, older repos and more confusion”
  1. Martin LanghoffApr 12, 2007
  2. Jeff KingApr 12, 2007
  3. Sam VilainApr 12, 2007
  4. Martin LanghoffApr 12, 2007
  5. Martin LanghoffApr 12, 2007
  6. Jeff KingApr 12, 2007
  7. Martin LanghoffApr 12, 2007
  8. Martin LanghoffApr 12, 2007
  9. Jeff KingApr 12, 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.