{"thread":{"id":"12882","subject":"Push merges?","startedAt":"2008-03-26T21:52:06Z","lastAt":"2008-03-27T03:09:35Z","messageCount":2,"participants":["Ryan Leigh","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"73168","messageId":"ba5eca00803261452r4b5a7b6bi600c30e79b945477@mail.gmail.com","threadId":"12882","inReplyTo":null,"subject":"Push merges?","fromName":"Ryan Leigh","fromEmail":"ryanl.pi@gmail.com","sentAt":"2008-03-26T21:52:06Z","receivedAt":"2008-03-26T21:52:06Z","isPatch":false,"sender":{"key":"ryanl.pi@gmail.com","avatar":null},"body":"Hello all,\n\nI've been getting to know git and I've stumbled across a \"problem\" and\nI haven't yet been able to find a solution. For example, say I have a\nbranch \"base\" and two branches of that \"foo\" and \"bar\". I make some\nchange in \"base\", commit it, and now I would like to have it in both\n\"foo\" and \"bar\". Is there a command that rather than get another\nbranch and merge with the current branch will instead take the current\nbranch and apply a merge on other branches? I've done google searches\nand looking through documentation and tutorials and I can't seem to\nfind an answer one way or another. I wanted to make sure that before I\ngo write some script to handle it that what I am looking for isn't\nalready a feature.\n\nThank you,\nRyan\n"},{"id":"73177","messageId":"20080327030935.GA4974@coredump.intra.peff.net","threadId":"12882","inReplyTo":"ba5eca00803261452r4b5a7b6bi600c30e79b945477@mail.gmail.com","subject":"Re: Push merges?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-03-27T03:09:35Z","receivedAt":"2008-03-27T03:09:35Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Mar 26, 2008 at 02:52:06PM -0700, Ryan Leigh wrote:\n\n> I've been getting to know git and I've stumbled across a \"problem\" and\n> I haven't yet been able to find a solution. For example, say I have a\n> branch \"base\" and two branches of that \"foo\" and \"bar\". I make some\n> change in \"base\", commit it, and now I would like to have it in both\n> \"foo\" and \"bar\". Is there a command that rather than get another\n> branch and merge with the current branch will instead take the current\n> branch and apply a merge on other branches? I've done google searches\n\nNo, there isn't such a command. Merges must be done one at a time\nbecause they use the index and working tree to report conflicts.\n\nSo what you are asking for is the moral equivalent of:\n\n  for i in foo bar; do\n    git checkout $i && git merge master\n  done\n\nand you could do it that way, except that the 'merge' step may fail with\nconflicts that need to be fixed up by hand.\n\n-Peff\n"}]}