{"thread":{"id":"16329","subject":"Error in git-cherry-pick manpage?","startedAt":"2008-11-14T15:14:26Z","lastAt":"2008-11-18T19:34:07Z","messageCount":2,"participants":["Jens Seidel","Pete Harlan"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"95794","messageId":"20081114151426.GA20985@merkur.sol.de","threadId":"16329","inReplyTo":null,"subject":"Error in git-cherry-pick manpage?","fromName":"Jens Seidel","fromEmail":"jensseidel@users.sf.net","sentAt":"2008-11-14T15:14:26Z","receivedAt":"2008-11-14T15:14:26Z","isPatch":false,"sender":{"key":"jensseidel@users.sf.net","avatar":null},"body":"Hi,\n\nI try to use git cherry-pick to combine multiple commits but I'm confused\nabout the second sentence of the description:\n\n\"Given one existing commit, apply the change the patch introduces, and\nrecord a new commit that records it. This requires your working tree to be\nclean (no modifications from the HEAD commit).\"\n\nI intent to use it as follows:\n\n git cherry-pick -x --no-commit 2e855ae\n git cherry-pick -x --no-commit 0c1151\n ...\n\nAfter the first invocation my working tree will not be clean but contain\nchanges in the index.\n\nDoes this mean that's a wrong usage of cherry-pick?\n\nJens\n"},{"id":"96092","messageId":"492318AF.8080004@pcharlan.com","threadId":"16329","inReplyTo":"20081114151426.GA20985@merkur.sol.de","subject":"Re: Error in git-cherry-pick manpage?","fromName":"Pete Harlan","fromEmail":"pgit@pcharlan.com","sentAt":"2008-11-18T19:34:07Z","receivedAt":"2008-11-18T19:34:07Z","isPatch":false,"sender":{"key":"pgit@pcharlan.com","avatar":null},"body":"Jens Seidel wrote:\n> Hi,\n> \n> I try to use git cherry-pick to combine multiple commits but I'm confused\n> about the second sentence of the description:\n> \n> \"Given one existing commit, apply the change the patch introduces, and\n> record a new commit that records it. This requires your working tree to be\n> clean (no modifications from the HEAD commit).\"\n> \n> I intent to use it as follows:\n> \n>  git cherry-pick -x --no-commit 2e855ae\n>  git cherry-pick -x --no-commit 0c1151\n>  ...\n> \n> After the first invocation my working tree will not be clean but contain\n> changes in the index.\n> \n> Does this mean that's a wrong usage of cherry-pick?\n\nIf it is, you might try this:\n\n  git cherry-pick -x 2e855ae             # Let it commit\n  git cherry-pick -x --no-commit 0c1151  # Will stage changes\n  git commit --amend\n  # Repeat last two steps as needed...\n\n--Pete\n"}]}