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

Re: Applying changes across divergent branches

From
Jeff King <peff@peff.net>
Date
Sep 24, 2008, 17:09 UTC
Message-ID
<20080924170956.GA9265@coredump.intra.peff.net>
In-Reply-To
<48DA514E.6060904@siscog.pt>
On Wed, Sep 24, 2008 at 03:40:14PM +0100, Tom Schutzer-Weissmann wrote:
> Could we use git, or a tool based on git, to change on the development  
> branch and selectively apply changes to the other branches - is it as  
> simple as using git cherry-pick?

If I am understanding your description of the problem correctly, then yes, it is as simple as cherry-picking.

If your branches have a strict hierarchy, you can also use a "merge up" workflow where some branches always contain all of other branches. For example, in git has a "maint" branch for stable bugfixes and a "master" branch for general development. The rule is that one must always merge "up", meaning that master can merge from maint, but maint can never merge from master. Stable bugfixes go on maint, and then get to master by merging.

Depending on the details of your branches, something like that may work for you. You can have a "base" branch that all product branches merge from, and only changes which should affect all products go on that branch (or on topic branches that are based on the "base" branch).

-Peff
Previous: Tom Schutzer-Weissmann
Message 2 of 2 in “Applying changes across divergent branches”
  1. Tom Schutzer-WeissmannSep 24, 2008
  2. Jeff KingSep 24, 2008

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.