Re: rebasing branch with reverted patches
- From
- Santi Béjar <santi@agolina.net>
- Date
- Apr 19, 2011, 09:39 UTC
- Message-ID
- <BANLkTim_QNFhChme=nxGf1_Dw8LedTS3Ag@mail.gmail.com>
- In-Reply-To
- <BANLkTimbSes-B8zK2a2t1Jp1v+29HdNvqw@mail.gmail.com>
On Tue, Apr 19, 2011 at 11:09 AM, Francis Moreau <francis.moro@gmail.com> wrote:
Show 22 quoted lines
> On Tue, Apr 19, 2011 at 10:42 AM, Michael J Gruber > <git@drmicha.warpmail.net> wrote: >> Francis Moreau venit, vidit, dixit 19.04.2011 09:32: >>> Hello, >>> >>> I'm wondering if it would be a good idea for git rebase to allow not >>> rebasing reverted patch which are part of the rebased branch. >>> >>> For example I'm currently rebasing my branch 'devel' onto master. This >>> branch have several commits and specially one called A and another one >>> called A' which reverts A. >>> >>> When rebasing 'devel' branch, rebase could try to drop both A and A'. >>> >>> What do you think ? >>> >>> BTW is there a way to do this currently ? >> >> You can do this with "rebase -i" by removing A and A' from the commit >> list (or squashing them or dealing with them in whatever way you like). > > Of course, but my point was to make this automatically...
You can also change the A' commit title to "fixup! original_title" while reverting (there is no --fixup argument like "git commit" has), then git rebase -i would reorder the todo file for you.
git revert gets confused by the resulting empty change but you can "git rebase --continue", or now that both are next to the other just remove them.
HTH, Santi