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

Re: branch versioning

From
Tomas Carnecky <tom@dbservice.com>
Date
Oct 4, 2010, 14:33 UTC
Message-ID
<4CA9E5C2.9040406@dbservice.com>
In-Reply-To
<AANLkTimWxPPi_hHuato+hHePaEja=66GzLEpDUVcZV0i@mail.gmail.com>
On 10/4/10 3:18 PM, Nguyen Thai Ngoc Duy wrote:
Show 13 quoted lines
> Hi,
> 
> How do you guys manage versions of a topic branch? I usually end up
> saving format-patch series somewhere or forget all old versions.
> Although I really want to keep old versions around. reflog to me   is
> polluted with every kind of branch updates. And it's local
> information. It can't be transferred to another repo (or can it?)
> 
> On the same subject, I have quite a few old topic branches that I
> rarely touch. I don't want to remove them. I just want to hide them
> away from "git branch". I've been thinking of "attic/" namespace that
> "git branch" by default will not show. Just wondering if other people
> face the same problem..

There was a blog post from someone suggesting how to extend rebase to track the old and new commits so the old ones don't get lost (sadly I can't find the blog post anymore). The idea was to add the old commit as the second parent to the newly rebased commits. This way you can track the evolution of commits across multiple iterations. You could do the same with topic branches: after you create the new version of the topic branch, add the old topic branch as the second parent of the new branch head (use merge -s ours to discard changes made by the old topic branch). And to submit the commits in a topic branch for review you'd use --first-parent.

tom
Previous: Nguyen Thai Ngoc Duy
Message 8 of 8 in “branch versioning”
  1. Nguyen Thai Ngoc DuyOct 4, 2010
  2. Matthieu MoyOct 4, 2010
  3. Ævar Arnfjörð BjarmasonOct 4, 2010
  4. Nguyen Thai Ngoc DuyOct 4, 2010
  5. Ævar Arnfjörð BjarmasonOct 4, 2010
  6. Michael J GruberOct 4, 2010
  7. Nguyen Thai Ngoc DuyOct 4, 2010
  8. Tomas CarneckyOct 4, 2010

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.