From: Denis Bueno Date: Fri, 11 Jul 2008 16:18:23 GMT Subject: Re: git cherry-pick before archive Message-ID: <6dbd4d000807110918s1187abeaye6f249ff60b650fb@mail.gmail.com> In-Reply-To: <20080711161158.GD10347@genesis.frugalware.org> On Fri, Jul 11, 2008 at 12:11, Miklos Vajna wrote: > On Fri, Jul 11, 2008 at 12:09:02PM -0400, Denis Bueno wrote: >> On Fri, Jul 11, 2008 at 11:51, Johannes Schindelin >> wrote: >> > $ git cherry-pick -n >> > $ git archive --format=tar --prefix=pfx/ $(git write-tree) | gzip > prj.tgz >> > $ git reset > > I guess he wanted to write 'git reset --hard' here ;-) But that will undo local modifications to any uncommitted files, not just those affected by the cherry-pick. I don't want to do that. >> Thank you! This is much better. The only thing that could improve it >> is by some way to "un-cherry-pick" the applied change (so that after >> "git reset" there are no local modifications to the file(s) changed by >> cherry-picking ). >> >> Is there an easy way to invert a patch to undo the change the original >> patch introduced? > > git show | git apply -R? Brilliant! Thanks. I didn't know about apply (or show for that matter ....). -- Denis