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

Re: [ANNOUNCE] Stacked Git 0.15-rc1

From
CMCatalin Marinas <catalin.marinas@gmail.com>
Date
Jul 14, 2009, 21:05 UTC
Message-ID
<b0943d9e0907141405p317df38fm99f171a3e1d7d118@mail.gmail.com>
In-Reply-To
<20090714175259.GA18250@cthulhu>
2009/7/14 Larry D'Anna <larry@elder-gods.org>:
Show 5 quoted lines
> * Catalin Marinas (catalin.marinas@gmail.com) [090712 18:41]:
>> - New 'publish' command for maintaining merge-friendly branches
>
> I'd like to know more about that.  The documentation doesn't say much.  What's
> it do exactly?

You basically keep two branches - one with patches where you can freely update, reorder, add and remove patches (re-writing the history) but usually private and another public that people can merge. The history is never re-written on the public branch and you never need to work on it directly. The tree of the public branch head is the same as the stgit branch tree (but history may differ).

The publish command checks for any new changes on the stgit branch and generates commits on top of the public branch (called <branch>.public by default). It detects new patches added on top of your branch and adds them as new commits to the public one. If the stgit branch was rebased, it generates a merge commit on the public branch. If a patch was modified and you then publish, it may ask for a commit message to describe the change. If you reorder patches but the final tree is not modified, no new changes are published.

I also find it useful when maintaining several stgit branches and want to merge them into a master branch. If there are conflicts, they need o be resolved every time I rebase the stgit branches. To avoid this, in the master branch I only merge the published branches (the master branch on http://www.linux-arm.org/git?p=linux-2.6.git;a=summary is created this way). This also helps with conflicts with upstream as you only need to solve them in the stgit branch rather than the master one.

-- 
Catalin
Previous: Larry D'Anna
Message 13 of 13 in “[ANNOUNCE] Stacked Git 0.15-rc1”
  1. Catalin MarinasJul 12, 2009
  2. Uwe Kleine-KönigJul 13, 2009
  3. Catalin MarinasJul 14, 2009
  4. Karl WibergJul 13, 2009
  5. Aneesh Kumar K.VJul 13, 2009
  6. Catalin MarinasJul 13, 2009
  7. Aneesh Kumar K.VJul 13, 2009
  8. Aneesh Kumar K.VJul 13, 2009
  9. Catalin MarinasJul 13, 2009
  10. Linus TorvaldsJul 13, 2009
  11. Catalin MarinasJul 14, 2009
  12. Larry D'AnnaJul 14, 2009
  13. Catalin MarinasJul 14, 2009

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.