From: Brian Gernhardt Date: Tue, 02 Jan 2007 21:26:46 GMT Subject: Re: [RFC] Re: git-svn: make git-svn commit-diff able to work without explicit arguments Message-ID: <052E1601-5422-48A0-81B3-9A454467CE5F@silverinsanity.com> In-Reply-To: <20070102211339.GF17898@hades.madism.org> > The reason is simple, I often use git commit as :wq in my editor, > and > sometimes think that in a A--B--C--D and in fact, I'd prefer to have: > > {A,C}--B--D. how is it possible to do that in a not too cumbersome > way? because that would make sens to work in some scratch branch, and > then reorganize patches in a saner better way in the master branch. > > But I fail to see how to achieve that without using cumbersome > export-to-patch then git apply patch and edit logs which is painful > and > not really using git. The command you seem to be looking for is git-cherry-pick. To combine the two commits, I'd do something like: $ git cherry-pick A $ git cherry-pick C $ git reset HEAD~2 $ git add $ git commit And then you could rebase the work branch on top of the new master, which should catch that A and C were already committed with minimal effort. Of course there may be a cleaner way to do it, but this is what I do. ~~ Brian Gernhardt