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

Re: git-branch, older repos and more confusion

From
Martin Langhoff <martin.langhoff@gmail.com>
Date
Apr 12, 2007, 06:00 UTC
Message-ID
<46a038f90704112300k3abd66d0nc4372962dbee8616@mail.gmail.com>
In-Reply-To
<20070412052118.GA30459@coredump.intra.peff.net>
On 4/12/07, Jeff King <peff@peff.net> wrote:
> > Any hints as to how to run such workflow on v1.5.x?
>
> This will seem like repetition, but it's like this:
Thanks for bearing with me ;-)
Show 8 quoted lines
>   git-clone <repo> mydir
>   cd mydir
>   git-checkout --track -b v1.9-clientname origin/v1.9-maint
>   git-push origin v1.9-clientname    # to create the new head remotely
>
> When you do a git-pull without arguments from the v1.9-clientname
> branch, it will first do a fetch of origin (grabbing the entire state,
> including the v1.9-maint branch) and then merge in origin's v1.9-maint.

Almost what I am after, but not quite. In my Cogito workflow, cg-update will by default pull from v1.9-clientname, which is what you want most of the time (collaborating with other developers on that branch). We do cg-update/cg-push all the time, and cg-update <maintbranch> is a less frequent operation.

On my own I had gotten almost to the same sequence you show above, but couldn't get it right. With what you are showing me now, I'd say

 git-clone <repo> mydir
 cd mydir
 git-checkout -b tmpbranch origin/v1.9-maint
 git-push origin v1.9-clientname    # to create the new head remotely
 git-checkout --track -b v1.9-clientname origin/v1.9-clientname
 git-deletebranch tmpbranch # this command doesn't exist!

And then git-pull / git-push will "do the right thing". And `git-pull origin/v1.9-maint` will trigger a fetch & merge.

> When you do a push without arguments, it will push every head you have
> in common with origin.
That's interesting!
cheers,
m
Previous: Jeff KingNext: Martin Langhoff
Message 7 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.