Thread (8 messages) flat view 8 messages, 3 authors, 2016-06-15

Re: git-branch, older repos and more confusion

From: Sam Vilain <hidden>
Date: 2016-06-15 22:43:04

Jeff King wrote:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help