{"id":10020446,"date":"2024-12-07T18:49:54","date_gmt":"2024-12-07T10:49:54","guid":{"rendered":"https:\/\/itmax.cn\/?p=10020446"},"modified":"2024-12-07T18:49:54","modified_gmt":"2024-12-07T10:49:54","slug":"git-cherry-pick%e7%9a%84%e7%94%a8%e6%b3%95%e8%ae%b0%e5%bd%95","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10020446","title":{"rendered":"git cherry-pick\u7684\u7528\u6cd5\u8bb0\u5f55"},"content":{"rendered":"<h2>\u7528\u9014<\/h2>\n<p>\u5c06\u5176\u4ed6\u5206\u652f\u7684commit\u6458\u5230\u5f53\u524d\u5206\u652f\u4e2d<\/p>\n<h2>\u7528\u6cd5<\/h2>\n<pre><code class=\"bash\"># \u5355\u4e2acommitId\ngit cherry-pick commitId\n\n# \u591a\u4e2acommitId\ngit cherry-pick commitId-1 commitId-2\n\n# \u8fde\u7eed\u7684\u591a\u4e2acommit-id\uff08\u5305\u542bcommitId-1\u548ccommitId-10\u4ee5\u53ca\u4e4b\u95f4\u6240\u6709\u7684commitId\uff09\ngit cherry-pick commitId-1^..commitId-10<\/code><\/pre>\n<h2>\u6ce8\u610f<\/h2>\n<p>cherry-pick\u547d\u4ee4\u540e\u9762\u7684commitId\u662f\u91c7\u7528\u76ee\u6807\u5206\u652f\u4e0a\u7684\u524d\u4e00\u4e2acommitId\u8fd8\u662f\u5bf9\u5e94\u7684\uff1f<br \/>\u9009\u62e9\u5bf9\u5e94\u7684\u90a3\u4e2acommitId\uff0c\u800c\u4e0d\u662f\u524d\u4e00\u6761\u3002<\/p>\n<p>\u6bd4\u5982\u76ee\u6807\u5206\u652f\u6709\u4e24\u4e2a\u63d0\u4ea4\uff1a<br \/>f775714 feat: \u52a0\u5165\u4e86\u77ed\u4fe1\u767b\u5f55\u529f\u80fd<br \/>01f88de feat: \u52a0\u5165\u4e86\u5fae\u4fe1\u767b\u5f55\u529f\u80fd<br \/>\u6211\u4eec\u60f3\u628a\u77ed\u4fe1\u767b\u5f55\u529f\u80fd\u7684\u63d0\u4ea4\u6458\u8fc7\u6765\uff0c\u90a3\u547d\u4ee4\u5c31\u662f\uff1a<\/p>\n<pre><code class=\"bash\">git cherry-pick f775714<\/code><\/pre>\n<p>\u5982\u4f55\u8ba9cherry-pick\u4e0d\u81ea\u52a8\u63d0\u4ea4\uff1f<br \/>-n\u53c2\u6570\u53ef\u4ee5\u8ba9cherry-pick\u4e0d\u81ea\u52a8\u63d0\u4ea4\uff0c\u800c\u662f\u628a\u6458\u8fc7\u6765\u7684commit\u653e\u5230staged changes\u4e2d<\/p>\n<pre><code class=\"bash\">git cherry-pick -n f775714<\/code><\/pre>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000045554298\">https:\/\/segmentfault.com\/a\/1190000045554298<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7528\u9014 \u5c06\u5176\u4ed6\u5206\u652f\u7684commit\u6458\u5230\u5f53\u524d\u5206\u652f\u4e2d \u7528\u6cd5 # \u5355\u4e2acommitId git cherry-pick  [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-10020446","post","type-post","status-publish","format-standard","hentry","category-share"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10020446","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10020446"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10020446\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10020446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10020446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10020446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}