* git-branch and git-remotes confusion
@ 2007-04-10 12:05 Martin Langhoff
2007-04-10 12:25 ` Jeff King
0 siblings, 1 reply; 3+ messages in thread
From: Martin Langhoff @ 2007-04-10 12:05 UTC (permalink / raw
To: Git Mailing List
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git-branch and git-remotes confusion
2007-04-10 12:05 git-branch and git-remotes confusion Martin Langhoff
@ 2007-04-10 12:25 ` Jeff King
2007-04-10 12:33 ` Martin Langhoff
0 siblings, 1 reply; 3+ messages in thread
From: Jeff King @ 2007-04-10 12:25 UTC (permalink / raw
To: Martin Langhoff; +Cc: Git Mailing List
On Wed, Apr 11, 2007 at 12:05:17AM +1200, Martin Langhoff wrote:
> git-clone http://git.catalyst.net.nz/git/moodle-r2.git
> git-branch --track origin/mdl18-olpc my18-olpc
Your arguments to git-branch are backwards. It should be:
git-branch --track my18-olpc origin/mdl18-olpc
Also note that --track didn't show up until 1.5.1. Other than that, it
should do what you expect (check out your .git/config before and after
to see the impact of --track).
-Peff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git-branch and git-remotes confusion
2007-04-10 12:25 ` Jeff King
@ 2007-04-10 12:33 ` Martin Langhoff
0 siblings, 0 replies; 3+ messages in thread
From: Martin Langhoff @ 2007-04-10 12:33 UTC (permalink / raw
To: Jeff King; +Cc: Git Mailing List
On 4/11/07, Jeff King <peff@peff.net> wrote:
> Your arguments to git-branch are backwards. It should be:
>
> git-branch --track my18-olpc origin/mdl18-olpc
>
> Also note that --track didn't show up until 1.5.1. Other than that, it
> should do what you expect (check out your .git/config before and after
> to see the impact of --track).
thanks. And I'm reading the doco for 1.5.latest and it turns out I'm
using 1.5.0.5 so that won't work either.
hmmm. actually, I'm having another problem that is a bit more serious:
cloning via http doesn't create a remotes/origin and doesn't perform
the initial checkout.
will post separately about this...
martin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-04-10 12:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-10 12:05 git-branch and git-remotes confusion Martin Langhoff
2007-04-10 12:25 ` Jeff King
2007-04-10 12:33 ` Martin Langhoff
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).