Thread (10 messages) flat view 10 messages, 3 authors, 2016-06-15

Re: git cherry-pick before archive

From: Denis Bueno <hidden>
Date: 2016-06-15 22:44:55

On Fri, Jul 11, 2008 at 12:11, Miklos Vajna [off-list ref] wrote:
On Fri, Jul 11, 2008 at 12:09:02PM -0400, Denis Bueno [off-list ref] wrote:
quoted
On Fri, Jul 11, 2008 at 11:51, Johannes Schindelin
[off-list ref] wrote:
quoted
$ git cherry-pick -n <bla>
$ 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.
quoted
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 <bla>).

Is there an easy way to invert a patch to undo the change the original
patch introduced?
git show <commit> | git apply -R?
Brilliant!  Thanks.  I didn't know about apply (or show for that matter ....).

-- 
 Denis
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help