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

Re: Commiting changes onto more than one branch

From
MJMike Jarmy <mjarmy@gmail.com>
Date
Nov 25, 2009, 17:40 UTC
Message-ID
<6b4a562b0911250940k29d5e7eck2bb35d6831ed3af9@mail.gmail.com>
In-Reply-To
<m38wdublbq.fsf@localhost.localdomain>
Jakub Narebski wrote:
Show 8 quoted lines
> Take a look at "Resolving conflicts/dependencies between topic
> branches early" blog post by Junio C Hamano (git maintainer) at
> http://gitster.livejournal.com/27297.html
>
> In short the solution is to create separate topic branch for a bugfix,
> branching off earliest place where it would be relevant, then merge
> this bugfix branch into all development branches you need
> (e.g. maint-v3, maint-v4, maint-v5, master).

Thanks guys. I think some cross between this and the cherry-picking idea would work for us most of the time, if we go with the workflow that I originally specified. I like the branch-per-bugfix idea -- its taking some time for me to free my mind to the point where I grok how lightweight and flexible branching really is. Just branch off from the earliest affected release, naming the branch after the bug ('fix-frobulator--issue-1235'). When finished, merge/cherry-pick back into the various branches.

Thomas's idea of using a more sophisticated workflow has definitely got me thinking. Back in the day, once we started working on a new release, say v6, then the other branches to an extent become mothballed except for bugfixes. In that case, using a merge-base approach would make sense. More and more though, we have started to build separate sub-projects on top of specific releases -- in other words, we are simultaneously making a new product on top of v4, while preparing to release v5, and getting ready to start work on v6 in earnest, all the while fixing bugs across mulitple releases going all the way back to v2. Its getting very complicated :-). And our current VCS is starting to become an active hindrance in helping us manage all this in a sane way.

What I'm going to do is set up a toy environment that mirrors what I hope our final repository will look like. Then I'll play with it for a while and concoct corner-case scenarios and see how it holds up. Once I have a workflow that I like, I can demonstrate it to my colleagues in gitk, and we can think about how to make it better.

Thanks, Mike Jarmy

Previous: Jakub NarebskiNext: Nicolas Pitre
Message 11 of 12 in “Commiting changes onto more than one branch”
  1. Mike JarmyNov 25, 2009
  2. Eugene SajineNov 25, 2009
  3. Mike JarmyNov 25, 2009
  4. Avery PennarunNov 25, 2009
  5. Junio C HamanoNov 25, 2009
  6. Mike JarmyNov 25, 2009
  7. Daniel BarkalowNov 25, 2009
  8. Andreas SchwabNov 25, 2009
  9. Thomas RastNov 25, 2009
  10. Jakub NarebskiNov 25, 2009
  11. Mike JarmyNov 25, 2009
  12. Nicolas PitreNov 25, 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.