{"thread":{"id":"36208","subject":"Rebasing merge commits","startedAt":"2014-03-18T18:11:06Z","lastAt":"2014-03-19T21:00:29Z","messageCount":2,"participants":["Robert Dailey","Max Kirillov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"236993","messageId":"CAHd499BFAmfDAjNr0RhCiy4vEBn2xJzCtTmwrB-U51qJryB+Dw@mail.gmail.com","threadId":"36208","inReplyTo":null,"subject":"Rebasing merge commits","fromName":"Robert Dailey","fromEmail":"rcdailey.lists@gmail.com","sentAt":"2014-03-18T18:11:06Z","receivedAt":"2014-03-18T18:11:06Z","isPatch":false,"sender":{"key":"rcdailey.lists@gmail.com","avatar":null},"body":"What's the general recommendation on rebasing after creating a merge\ncommit on my branch? I realize rebase has the -p option but it seems\nlike it does a lot of complicated stuff, and it discourages\ninteractive rebase with the option.\n\nMy situation is simple: I have a topic1 branch that has a few commits\non it. During my work, I notice someone else implements a small bug\nfix that I need. I do a `git merge --no-ff` to force that into my\nbranch as a separate merge commit. After that, I continue my work on\nmy local topic1 branch as usual. When I want latest from master, I do\n`git rebase master`. However now that I have a merge commit on my\nbranch, things get complicated.\n\nWhat's a good workflow for this, since it seems pretty common?\n"},{"id":"237115","messageId":"20140319210029.GA6457@wheezy.local","threadId":"36208","inReplyTo":"CAHd499BFAmfDAjNr0RhCiy4vEBn2xJzCtTmwrB-U51qJryB+Dw@mail.gmail.com","subject":"Re: Rebasing merge commits","fromName":"Max Kirillov","fromEmail":"max@max630.net","sentAt":"2014-03-19T21:00:29Z","receivedAt":"2014-03-19T21:00:29Z","isPatch":false,"sender":{"key":"max@max630.net","avatar":"https://avatars.githubusercontent.com/u/381560?v=4"},"body":"On Tue, Mar 18, 2014 at 01:11:06PM -0500, Robert Dailey wrote:\n> What's the general recommendation on rebasing after\n> creating a merge commit on my branch?\n\nBasically, rebase does not do anything magic. It just\ncherry-picks commits over a custom revision. You could do it\nmanually: reset to the master and then cherry-pick all\nyour commits (or whichever you would like to pick) from the\nolder topic1. git rebase --onto would be useful to make it\na bit less manual it there are many commits and few merges.\n\nI used to do it myself, but later I have made my own rebase\nwhich can somehow handle merges:\nhttps://github.com/max630/git-rebase2/\nYou could try it also.\n\n-- \nMax\n"}]}