{"thread":{"id":"2996","subject":"How do I apply a single \"change\"","startedAt":"2006-01-08T00:31:14Z","lastAt":"2006-01-08T02:24:31Z","messageCount":5,"participants":["Luben Tuikov","Junio C Hamano","Andreas Ericsson","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"14275","messageId":"20060108003114.4679.qmail@web31812.mail.mud.yahoo.com","threadId":"2996","inReplyTo":null,"subject":"How do I apply a single \"change\"","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2006-01-08T00:31:14Z","receivedAt":"2006-01-08T00:31:14Z","isPatch":false,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"Forgive me for the _incredibly stupid questions_,\nbut how do I apply a single \"change\", identified\nby its SHA?  Either from one branch to the other or\nremote?\n\nI.e. I want to \"integrate\" only that change?\n\nAlternatively, how do I apply the absolute output of\n\"git-format-patch\".  I tried but whatever I tried with\ncomplained that it couldn't find any email addressess.\n(roll eyes here)\n\nThanks for the help,\n   Luben\n"},{"id":"14283","messageId":"7v7j9b8sgf.fsf@assigned-by-dhcp.cox.net","threadId":"2996","inReplyTo":"20060108003114.4679.qmail@web31812.mail.mud.yahoo.com","subject":"Re: How do I apply a single \"change\"","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-08T00:38:08Z","receivedAt":"2006-01-08T00:38:08Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Luben Tuikov <ltuikov@yahoo.com> writes:\n\n> ... how do I apply a single \"change\", identified\n> by its SHA?  Either from one branch to the other or\n> remote?\n>\n> I.e. I want to \"integrate\" only that change?\n\n$ git-cherry-pick $object_name\n\n> Alternatively, how do I apply the absolute output of\n> \"git-format-patch\".  I tried but whatever I tried with\n> complained that it couldn't find any email addressess.\n> (roll eyes here)\n\nIt is unclear what you mean by absolute output, but here is what\nI regularly do:\n\n$ git-format-patch -k -m --stdout from to | git am -3 -k\n"},{"id":"14286","messageId":"20060108005152.46315.qmail@web31813.mail.mud.yahoo.com","threadId":"2996","inReplyTo":"7v7j9b8sgf.fsf@assigned-by-dhcp.cox.net","subject":"Re: How do I apply a single \"change\"","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2006-01-08T00:51:52Z","receivedAt":"2006-01-08T00:51:52Z","isPatch":false,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"--- Junio C Hamano <junkio@cox.net> wrote:\n\n> Luben Tuikov <ltuikov@yahoo.com> writes:\n> \n> > ... how do I apply a single \"change\", identified\n> > by its SHA?  Either from one branch to the other or\n> > remote?\n> >\n> > I.e. I want to \"integrate\" only that change?\n> \n> $ git-cherry-pick $object_name\n\nOk, so git searches the db (other branches, etc) and\ndoes the job.  This worked for me.\n\nHow will I do this same thing but if the \"change\" is\non a remote repository?\n\n> > Alternatively, how do I apply the absolute output of\n> > \"git-format-patch\".  I tried but whatever I tried with\n> > complained that it couldn't find any email addressess.\n> > (roll eyes here)\n> \n> It is unclear what you mean by absolute output, but here is what\n> I regularly do:\n> \n> $ git-format-patch -k -m --stdout from to | git am -3 -k\n\nI did \n$ git-format-patch commit^ commit\n\nand the usual 0001-blah-blah file got created.  Then\nI tried to apply it, but whatever I tried it complained.\nWill \"git-am -3 -k\" work without complaining there is\nno \"email field\" or something?  (I cannot try it as\ngit-cherry-pick worked for me already.)\n\nThanks,\n   Lunen\n"},{"id":"14287","messageId":"43C06892.2030709@op5.se","threadId":"2996","inReplyTo":"20060108005152.46315.qmail@web31813.mail.mud.yahoo.com","subject":"Re: How do I apply a single \"change\"","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2006-01-08T01:19:14Z","receivedAt":"2006-01-08T01:19:14Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Luben Tuikov wrote:\n> --- Junio C Hamano <junkio@cox.net> wrote:\n>>\n>>$ git-cherry-pick $object_name\n> \n> \n> Ok, so git searches the db (other branches, etc) and\n> does the job.  This worked for me.\n> \n> How will I do this same thing but if the \"change\" is\n> on a remote repository?\n> \n\nYou can't. cherry-pick doesn't work on remote repos, so you need to pull \nthat branch to a local one first.\n\n> \n>>>Alternatively, how do I apply the absolute output of\n>>>\"git-format-patch\".  I tried but whatever I tried with\n>>>complained that it couldn't find any email addressess.\n>>>(roll eyes here)\n>>\n>>It is unclear what you mean by absolute output, but here is what\n>>I regularly do:\n>>\n>>$ git-format-patch -k -m --stdout from to | git am -3 -k\n> \n> \n> I did \n> $ git-format-patch commit^ commit\n> \n> and the usual 0001-blah-blah file got created.  Then\n> I tried to apply it, but whatever I tried it complained.\n> Will \"git-am -3 -k\" work without complaining there is\n> no \"email field\" or something?  (I cannot try it as\n> git-cherry-pick worked for me already.)\n> \n\nYou need to specify the '--mbox' (or '-m') for git-format-patch, \notherwise it can't find author-info in the generated patch and it won't \nknow who committed what.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"14292","messageId":"Pine.LNX.4.64.0601071823550.3169@g5.osdl.org","threadId":"2996","inReplyTo":"43C06892.2030709@op5.se","subject":"Re: How do I apply a single \"change\"","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-01-08T02:24:31Z","receivedAt":"2006-01-08T02:24:31Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sun, 8 Jan 2006, Andreas Ericsson wrote:\n> \n> You can't. cherry-pick doesn't work on remote repos, so you need to pull that\n> branch to a local one first.\n\n\"fetch\", not \"pull\".\n\nIt's easy enough to get confused anyway, so we should be careful.\n\n\t\tLinus\n"}]}