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

git-branch and git-remotes confusion

From
Martin Langhoff <martin.langhoff@gmail.com>
Date
Apr 10, 2007, 12:05 UTC
Message-ID
<46a038f90704100505i7bdd88a8q52186f7ce7ff0cdf@mail.gmail.com>
Hi,

maybe I'm daft, or cogito has eaten my brain. The task at hand is really simple: clone from repo X, tracking branch Y (where branch Y != HEAD). The repo is http://git.catalyst.net.nz/git/moodle-r2.git , the branch is mdl18-olpc .

With cg, this is trivial:
  cg-clone http://git.catalyst.net.nz/git/moodle-r2.git#mdl18-olpc

which automagically gives me a "master" and "origin" pair of heads that do the right thing. Specifically, cg-update does the right thing.

With git 1.5.x, I managed to figure out that this is wrong. :
  git-clone --origin mdl18-olpc \
      http://git.catalyst.net.nz/git/moodle-r2.git
and now I am trying to see if some incantation around this works
   git-clone http://git.catalyst.net.nz/git/moodle-r2.git
   git-branch --track origin/mdl18-olpc my18-olpc

But it isn't working, and I'm reading git/Documentation for git-branch and git-remote but I can't find it. I don't care about any other branch (though if they are there, fine!). Is there a trivially simple answer.

(Cogito has eaten my brain probably. For a long time I've always cloned with cogito just for the sake of this convenience, even if I was going to use git mostly when working with the code. Now I'm working on a server that only has git, so I thought 1.5.x would make this trivial...)

cheers,
martin
Next: Jeff King
Message 1 of 3 in “git-branch and git-remotes confusion”
  1. Martin LanghoffApr 10, 2007
  2. Jeff KingApr 10, 2007
  3. Martin LanghoffApr 10, 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.