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

Re: Question: next, master and pu branches

From
Shawn O. Pearce <spearce@spearce.org>
Date
Feb 2, 2007, 06:00 UTC
Message-ID
<20070202060030.GA20442@spearce.org>
In-Reply-To
<200702021142.08975.litvinov2004@gmail.com>
Alexander Litvinov <litvinov2004@gmail.com> wrote:
> Can somebody explain the meaning of next and pu branches
Within git.git:
  maint: Current stable release.  Receives bug fixes for the
  current release.
  master: Stable development tip.  The tip of this branch will be
  used to create the next stable release.
  next: Topics which are pretty stable and are likely to be merged
  into master soon are merged here first, to make them visible to
  a wider community and get more testing.
  pu: aka "Proposed Updates".  Junio publishes a number of branches
  here and continously rebases this branch.  Topics here may make
  it into next (and then later master), or may not and just be
  dropped forever.
>and some documenation 
> about using topic branches.
What about Documentation/howto/using-topic-branches.txt ?
 
Show 13 quoted lines
> My development model use two branches now: stable release and develment 
> branch. All changes in the stable release branch are bug-fix only changes. 
> All (or most) of them must go to development release. Now I do this using 
> cherry-pick but it is not easy to track what was merged especialy when merge 
> pruduce confic resloved by hands. Stable branch live long life, much more 
> than 100 commits. 
> 
> It seems topic branches can help me here, but reading Documentation under git 
> sources teach to make topic branch from the branch point and then merge it to 
> both branches. This can work while stable branch has short life and was not 
> heavily rewritten. 
> 
> If there any technique that can help me ?

The easiest way to do this is to create a new topic branch from the merge base of the two branches (see git-merge-base's docs for details). Make the fix on this branch, test it, then merge it into your development branch.

If additional changes are needed, go back to the topic branch, fix it there, then remerge the topic to your development branch.

When the topic is finally ready, merge it to your stable branch.

This is what the documentation suggests, because it works, and works well. This is how Junio manages `next` (which is the same as your development branch) and `master` (which is about the same as your stable branch).

You can let git-rerere help you to manage conflicts which might reoccur during merges. If you create the .git/rr-cache directory then git-commit and git-merge will automatically use git-rerere to help you.

If you are cherry-picking stuff back and forth this gets really hard, as you point out. The tools don't help you very well here, as there isn't enough data to figure out what is where. You can try using git-cherry to tell you which commits are in both branches, but it has limited usefulness if the commits are making different changes.

-- 
Shawn.
Previous: Alexander LitvinovNext: Alexander Litvinov
Message 2 of 6 in “Question: next, master and pu branches”
  1. Alexander LitvinovFeb 2, 2007
  2. Shawn O. PearceFeb 2, 2007
  3. Alexander LitvinovFeb 2, 2007
  4. Shawn O. PearceFeb 2, 2007
  5. Junio C HamanoFeb 2, 2007
  6. Alexander LitvinovFeb 2, 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.