{"id":959,"date":"2023-04-09T00:14:55","date_gmt":"2023-04-08T16:14:55","guid":{"rendered":"http:\/\/codermr.com\/?p=959"},"modified":"2025-03-03T20:05:31","modified_gmt":"2025-03-03T12:05:31","slug":"gitmerge-or-gitrebase","status":"publish","type":"post","link":"http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/","title":{"rendered":"Git merge ? \u8fd8\u662f Git rebase ?"},"content":{"rendered":"\n<p>\u5728 Git \u4e2d\u6574\u5408\u6765\u81ea\u4e0d\u540c\u5206\u652f\u7684\u4fee\u6539\u4e3b\u8981\u6709\u4e24\u79cd\u65b9\u6cd5\uff1amerge \u4ee5\u53ca rebase\u3002\u90a3\u4e48\u5e94\u8be5\u4f7f\u7528 Git merge \u8fd8\u662f Git rebase \u5462\uff1f<\/p>\n\n\n\n<p>\u5173\u4e8e\u8fd9\u4e2a\u95ee\u9898\uff0c\u7a0b\u5e8f\u5458\u4e4b\u95f4\u7684\u4e89\u8bba\u4f3c\u4e4e\u4ece\u6765\u90fd\u6ca1\u6709\u505c\u6b62\u8fc7\uff01\u6301\u4e0d\u540c\u89c2\u70b9\u7684\u4eba\uff0c\u5404\u6709\u5404\u7684\u7406\u7531\uff0c\u5e76\u4e14\u5f88\u96be\u8bf4\u670d\u5bf9\u65b9\uff01\u6240\u4ee5\u4e00\u4e2a\u6298\u4e2d\u7684\u56de\u7b54\u4f3c\u4e4e\u5e94\u8be5\u662f\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u5173\u4e8e\u5e94\u8be5\u4f7f\u7528 Git merge \u8fd8\u662f Git rebase \uff0c\u9700\u8981\u6839\u636e\u5177\u4f53\u60c5\u51b5\u6765\u5177\u4f53\u5206\u6790\u3002<\/p>\n<\/blockquote>\n\n\n\n<p>\u8fd9\u53e5\u8bdd\u5f53\u7136\u6ca1\u9519\uff0c\u4f46\u662f\u672c\u6587\uff0c\u6211\u60f3\u518d\u6df1\u5165\u804a\u4e00\u4e0b\uff1a\u5230\u5e95\uff08\u66f4\uff09\u5e94\u8be5\u4f7f\u7528 Git merge \u8fd8\u662f Git rebase \u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u4e00\u4e2a\u6bd4\u8f83\u6709\u610f\u601d\u7684\u73b0\u8c61\u662f\uff1a\u5728\u600e\u4e48\u4f7f\u7528 Git \u4e0a\u9762\uff0c\u7a0b\u5e8f\u5458\u4e4b\u95f4\u603b\u662f\u6709\u5f88\u591a\u4e89\u8bba\u548c\u76f8\u6096\u7684\u89c2\u70b9\uff0c\u4ece Git \u5206\u652f\uff08\u5f00\u53d1\u5206\u652f\u3001\u6d4b\u8bd5\u5206\u652f\u3001\u7ebf\u4e0a\u5206\u652f\u3001feature \u5206\u652f\u7b49\uff09\u5e94\u8be5\u5982\u4f55\u521b\u5efa\u3001\u5982\u4f55\u5408\u5e76\u3001\u4ec0\u4e48\u65f6\u5019\u5408\u5e76\u7b49\uff0c\u5230\u5e94\u8be5\u4f7f\u7528 Git merge \u8fd8\u662f Git rebase \uff0c\u7a0b\u5e8f\u5458\u4e4b\u95f4\u7684\u4e89\u8bba\u4ece\u6765\u6ca1\u6709\u505c\u6b62\u8fc7\uff0c\u751a\u81f3\u5f88\u96be\u8fbe\u6210\u4e00\u4e2a\u57fa\u672c\u7684\u5171\u8bc6\uff0c\u4e3a\u4ec0\u4e48\u5462\uff1f<\/p>\n\n\n\n<p>\u6839\u672c\u539f\u56e0\uff0c\u8fd8\u662f\u5728\u4e8e Git \u4f7f\u7528\u8d77\u6765\u592a\u7075\u6d3b\u4e86\uff0cGit \u7684\u547d\u4ee4\u592a\u591a\u4e86\uff0c\u8fbe\u5230\u540c\u4e00\u4e2a\u76ee\u7684\u53ef\u9009\u62e9\u7684\u65b9\u5f0f\u592a\u591a\u4e86\uff0c\u800c\u4e0d\u540c\u516c\u53f8\u4e0d\u540c\u90e8\u95e8\uff0c\u5176\u9879\u76ee\u89c4\u6a21\u5dee\u5f02\u5de8\u5927\uff0c\u5bfc\u81f4\u4e0d\u540c\u516c\u53f8\/\u90e8\u95e8\u7684\u5f00\u53d1\u8005\u4f7f\u7528 Git \u7684\u65b9\u5f0f\u4e5f\u5dee\u522b\u5de8\u5927\u3002\u6240\u4ee5\u8fd8\u662f\u90a3\u53e5\u8bdd\uff1a\u5177\u4f53\u600e\u4e48\u4f7f\u7528 Git \u8fd8\u662f\u8981\u6839\u636e\u516c\u53f8\u5185\u90e8\u5177\u4f53\u60c5\u51b5\u800c\u5b9a\u3002\u5de5\u5177\u7684\u4f7f\u7528\uff0c\u6ca1\u6709\u7edd\u5bf9\u7684\u6807\u51c6\uff0c\u53ea\u8981\u4f60\u7528\u7684\u987a\u624b\u5c31\u884c\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5148\u770b\u4e00\u5f20\u56fe\u6765\u56de\u987e\u4e00\u4e0b Git merge \u548c Git rebase \u7684\u5dee\u522b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/codermr.com\/wp-content\/uploads\/2023\/04\/image-3.png\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"893\" src=\"http:\/\/codermr.com\/wp-content\/uploads\/2023\/04\/image-3.png\" alt=\"\" class=\"wp-image-970\" srcset=\"http:\/\/codermr.com\/wp-content\/uploads\/2023\/04\/image-3.png 720w, http:\/\/codermr.com\/wp-content\/uploads\/2023\/04\/image-3-242x300.png 242w\" sizes=\"(max-width: 720px) 100vw, 720px\" \/><\/a><\/figure>\n\n\n\n<p>merge \u7684\u4f7f\u7528\u6bd4\u8f83\u7b80\u5355\uff0c\u5728\u5206\u652f\u5408\u5e76\u7684\u65f6\u5019\u5982\u679c\u53ef\u4ee5\u4f7f\u7528 fast-forward \u5219 Git \u9ed8\u8ba4\u4f1a\u4f7f\u7528 fast-forward\uff08\u53ef\u4ee5\u4f7f\u7528 &#8211;no-ff \u53c2\u6570\u7981\u6b62 fast-forward\uff09\uff0c\u5426\u5219 Git \u4f1a\u4f7f\u7528\u4e24\u4e2a\u5206\u652f\u7684\u672b\u7aef\u6240\u6307\u7684\u5feb\u7167\u3001\u4ee5\u53ca\u8fd9\u4e24\u4e2a\u5206\u652f\u7684\u516c\u5171\u7956\u5148\uff0c\u505a\u4e00\u4e2a\u7b80\u5355\u7684\u4e09\u65b9\u5408\u5e76\uff0cGit \u5c06\u6b64\u6b21\u4e09\u65b9\u5408\u5e76\u7684\u7ed3\u679c\u505a\u4e86\u4e00\u4e2a\u65b0\u7684\u5feb\u7167\u5e76\u4e14\u81ea\u52a8\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u63d0\u4ea4\u6307\u5411\u5b83\u3002<\/p>\n\n\n\n<p>rebase\uff0cre \u5373\u201c\u91cd\u65b0\u201d\u7684\u610f\u601d\uff0crebase \u5c31\u662f\u91cd\u65b0\u8bbe\u7f6e\u57fa\u7840\u8282\u70b9\u7684\u610f\u601d\u3002<strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">\u5f53\u6211\u4eec\u8bf4\u5c06 dev \u5206\u652f\u53d8\u57fa\u5230 master \u4e0a\u65f6\uff0c\u5176\u5b9e\u5c31\u662f\u5c06 master \u4e0a\u6700\u540e\u4e00\u4e2a\u8282\u70b9\u5f53\u4f5c dev \u5206\u652f\u7684\u65b0\u7684\u57fa\u70b9\uff0c\u7136\u540e\u5c06 dev \u5206\u652f\u4e0a\u4f4d\u4e8e dev-master \u5171\u540c\u7ed3\u70b9\u4e4b\u540e\u7684\u63d0\u4ea4\uff0c\u6dfb\u52a0\u5230\u65b0\u7684\u57fa\u70b9\u4e4b\u540e\uff08\u505a\u8fd9\u4e9b\u52a8\u4f5c\u65f6\u4f60\u4f9d\u7136\u5904\u4e8e dev \u5206\u652f\uff09\u3002<\/mark><\/strong>\u8fd9\u91cc\u6709\u4e00\u4e2a\u6ce8\u610f\u70b9\uff0c\u5982\u4e0a\u56fe\u53d8\u57fa\u4e4b\u540e\u65b0\u7684 E&#8217;\u3001F&#8217;\u3001G&#8217; \u548c\u539f\u5148\u7684 E\u3001F\u3001G \u8282\u70b9\u7684\u54c8\u5e0c\u503c\u662f\u4e0d\u540c\u7684\u3002\u6b63\u56e0\u4e3a\u5982\u6b64\uff0c\u6240\u4ee5\u4f7f\u7528 rebase \u547d\u4ee4\u6709\u4e00\u4e2a\u9ec4\u91d1\u6cd5\u5219\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">\u5982\u679c\u63d0\u4ea4\u5b58\u5728\u4e8e\u4f60\u7684\u4ed3\u5e93\u4e4b\u5916\uff0c\u800c\u522b\u4eba\u53ef\u80fd\u57fa\u4e8e\u8fd9\u4e9b\u63d0\u4ea4\u8fdb\u884c\u5f00\u53d1\uff0c\u90a3\u4e48\u4e0d\u8981\u6267\u884c\u53d8\u57fa\u3002<\/mark><\/strong><\/p>\n<\/blockquote>\n\n\n\n<p>\u7b80\u5355\u6765\u8bf4\u5c31\u662f\uff0c<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">\u4f60\u8981 rebase \u5c31 rebase \u4f60\u81ea\u5df1\u7684\u5206\u652f<\/mark>\uff0c\u522b rebase \u522b\u4eba\u7684\u5206\u652f\uff0c\u7279\u522b\u662f\u591a\u4eba\u534f\u8c03\u5f00\u53d1\u65f6\u7684\u4e3b\u5e72\u5206\u652f\u3002\u56e0\u4e3a\u4f60\u4e00\u65e6 rebase \u4e86\u522b\u4eba\u7684\u5206\u652f\u6216\u4e3b\u5e72\u5206\u652f\uff0c\u5219\u5176\u5b9e\u5df2\u7ecf\u4fee\u6539\u4e86\u522b\u4eba\u5206\u652f\u6216\u4e3b\u5e72\u5206\u652f\u4e0a\u76f8\u5173\u8282\u70b9\u7684 commit \u4fe1\u606f\uff0c\u4f46\u522b\u4eba\u672c\u5730\u7684 commit \u8282\u70b9\u8fd8\u662f\u539f\u5148\u7684 commit \u4fe1\u606f\uff0c\u6700\u7ec8\u5728\u63d0\u4ea4\u8bb0\u5f55\u4e2d\u4f60\u4f1a\u53d1\u73b0\u6709\u4e24\u4e2a\u63d0\u4ea4\u7684\u4f5c\u8005\u3001\u65e5\u671f\u3001\u65e5\u5fd7\u5c45\u7136\u662f\u4e00\u6837\u7684\uff0c\u8fd9\u4f1a\u4ee4\u4eba\u611f\u5230\u6df7\u4e71\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">\u6211\u7684\u770b\u6cd5\uff1a<\/h5>\n\n\n\n<p>merge \u547d\u4ee4\u4f7f\u7528\u96be\u5ea6\u4f4e\u4e8e rebase\uff0crebase \u5982\u679c\u4f7f\u7528\u65b9\u5f0f\u6709\u8bef\uff0c\u4f1a\u5bfc\u81f4\u975e\u5e38\u4e25\u91cd\u7684\u540e\u679c\uff0cmerge \u547d\u4ee4\u5219\u5b89\u5168\u7684\u591a\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528 merge \u547d\u4ee4\u4f1a\u4fdd\u7559\u6240\u6709 commit \u7684\u5386\u53f2\u65f6\u95f4\u548c\u4fee\u6539\uff0c\u6bcf\u4e2a\u5f00\u53d1\u8005\u7684\u6bcf\u4e00\u6b21\u63d0\u4ea4\u5185\u5bb9\u3001\u63d0\u4ea4\u65f6\u95f4\u90fd\u53ef\u4ee5\u88ab\u8ffd\u6eaf\u5230\uff0c\u8fd9\u4e5f\u662f\u5f88\u591a\u4eba\u652f\u6301\u4f7f\u7528 merge \u7684\u539f\u56e0\u3002\u4f46\u4e5f\u6b63\u662f\u8fd9\u4e2a\u539f\u56e0\uff0c\u76f8\u5f53\u591a\u5f00\u53d1\u8005\u4f1a\u628a\u6ca1\u6709\u5f00\u53d1\u5b8c\u3001\u4e0d\u5b8c\u6574\u7684\u4e34\u65f6\u6587\u4ef6\u7ed9 commit \u4e86\uff0c\u4e00\u6b21\u5c0f\u7684\u529f\u80fd\u8fed\u4ee3\u5f00\u53d1\uff0c\u53ef\u80fd\u4f1a\u6709\u51e0\u5341\u4e0a\u767e\u6b21 commit\uff0c\u5176\u4e2d\u5f88\u591a commit\uff08\u6bd4\u5982\u5199\u5230\u4e00\u534a\u7684\u65b9\u6cd5\u3001\u6ca1\u6709\u81ea\u6d4b\u800c\u7f16\u8bd1\u62a5\u9519\u7684\u4ee3\u7801\u3001\u6279\u91cf\u91cd\u547d\u540d\u3001\u4fee\u6539\u4e00\u4e2a\u53d8\u91cf\u540d\u3001\u589e\u52a0\u4e00\u6761\u65e5\u5fd7\u7b49\u7b49\uff09\u8981\u4e48\u662f\u6ca1\u6709\u610f\u4e49\u7684\u3001\u8981\u4e48\u662f\u53ef\u4ee5\u88ab\u5408\u5e76\u6210\u4e00\u4e2a\u7684\uff0c\u8fd9\u4e9b commit \u4f1a\u9020\u6210\u63d0\u4ea4\u5386\u53f2\u6df7\u4e71\u4e14\u96be\u4ee5\u8fdb\u884c\u4ee3\u7801 review \uff0c\u8fd9\u79cd\u6df7\u4e71\u7684\u3001\u4ea4\u53c9\u7684\u63d0\u4ea4\u5386\u53f2\uff0c\u6211\u76f8\u4fe1\u662f\u6ca1\u6709\u4eba\u4e50\u610f\u53bb\u91cc\u9762\u7ffb\u4ee3\u7801\u7684\uff0c\u800c\u4e14\u4e5f\u57fa\u672c\u4e0d\u53ef\u80fd\u8fdb\u884c\u4ee3\u7801 review\u3002<\/p>\n\n\n\n<p>git \u7684\u6bcf\u4e2a commit \u90fd\u5e94\u8be5\u4ee3\u8868\u4e00\u4e2a\u5b8c\u6210\u7684\u903b\u8f91\uff0cgit \u80fd\u8bb0\u5f55\u6bcf\u6b21 commit \u7684\u5386\u53f2\u65f6\u95f4\u548c\u4fee\u6539\uff0c\u4f46\u4e0d\u80fd\u628a git \u7684 commit \u5f53\u4f5c\u4e00\u4e2a\u300e\u6587\u4ef6\u5907\u4efd\u300f\u7684\u529f\u80fd\u6765\u4f7f\u7528\u3002<\/p>\n\n\n\n<p>rebase \u80fd\u591f\u4fdd\u6301\u4e3b\u5e72\u5206\u652f\u7684\u5e72\u51c0\uff08\u4e00\u6761\u7ebf\uff09\uff0c\u4e0d\u4f1a\u50cf merge \u90a3\u6837\u4ea7\u751f\u5f88\u591a\u6df7\u4e71\u4ea4\u53c9\u7684\u63d0\u4ea4\u8bb0\u5f55\uff0c<s>\u65b9\u4fbf\u4ee3\u7801 review<\/s> \uff0crebase \u4f7f\u7528\u95e8\u69db\u9ad8\u4e8e merge\uff0c\u5982\u679c rebase \u7684\u4f7f\u7528\u65b9\u5f0f\u6709\u8bef\uff0c\u4f1a\u5bfc\u81f4\u975e\u5e38\u4e25\u91cd\u7684\u540e\u679c\uff0c\u800c merge \u5219\u51e0\u4e4e\u4e0d\u4f1a\u5bfc\u81f4\u8fd9\u79cd\u4e25\u91cd\u7684\u540e\u679c\u3002<\/p>\n\n\n\n<p><strong>\u6211\u89c9\u5f97 merge \u548c rebase \u6700\u4e3b\u8981\u7684\u5dee\u522b\u6709\u4e24\u70b9\uff1a\u7b2c\u4e00\u70b9\uff0c\u662f\u5426\u4f1a\u5bf9\u63d0\u4ea4\u5386\u53f2\u8fdb\u884c\u4fee\u6539\u3002\u7b2c\u4e8c\u70b9\uff0c\u662f\u5426\u9700\u8981\u4fdd\u6301\u5e72\u51c0\u6e05\u6670\u4e00\u6761\u76f4\u7ebf\u7684\u63d0\u4ea4\u5386\u53f2\u3002<\/strong><\/p>\n\n\n\n<p>\u6240\u4ee5\u6700\u7ec8\uff0c\u6211\u4eec\u9700\u8981\u601d\u8003\u7684\u4e00\u4e2a\u95ee\u9898\u662f\uff1a<strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">\u63d0\u4ea4\u5386\u53f2\uff0c\u610f\u5473\u7740\u4ec0\u4e48\uff1f<\/mark><\/strong><\/p>\n\n\n\n<p>\u5982\u679c\u4f60\u8ba4\u4e3a\u63d0\u4ea4\u5386\u53f2\u5c31\u50cf\u300e\u5feb\u7167\u300f\u4e00\u6837\uff0c\u662f\u67d0\u4e00\u65f6\u523b\u4ee3\u7801\u4fee\u6539\u7684\u5feb\u7167\uff0c\u4e0d\u5141\u8bb8\u88ab\u4fee\u6539\uff0c\u90a3\u4f7f\u7528 merge \u66f4\u597d\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u4f60\u8ba4\u4e3a\u63d0\u4ea4\u5386\u53f2\uff0c\u5c31\u50cf\u5199\u6587\u7ae0\u65f6\u7684\u8349\u7a3f\uff0c\u5728\u6587\u7ae0\u5199\u5b8c\u4e4b\u540e\uff0c\u8349\u7a3f\u5c31\u6ca1\u6709\u7528\u4e86\uff0c\u8349\u7a3f\u53ef\u4ee5\u6839\u636e\u60c5\u51b5\u88ab\u4fee\u6539\u6216\u5220\u6389\uff0c\u4ee5\u4f7f\u63d0\u4ea4\u8bb0\u5f55\u66f4\u52a0\u6e05\u6670\u65b9\u4fbf\u540e\u4eba\u7406\u89e3\uff0c\u90a3\u4e48\u4f7f\u7528 rebase \u548c filter-branch \u66f4\u597d\u3002<\/p>\n\n\n\n<p>\u6240\u4ee5\u4f7f\u7528 merge \u8fd8\u662f rebase \u8fd8\u662f\u5f97\u6839\u636e\u5177\u4f53\u60c5\u51b5\u800c\u5b9a\uff0c\u73b0\u5b9e\u4e2d\u4e00\u822c\u662f\u7531\u6280\u672f Leader \u51b3\u5b9a\uff0c\u9700\u8981\u7efc\u5408\u5404\u65b9\u9762\u7684\u56e0\u7d20\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u5b8c\u3002<\/h1>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 Git \u4e2d\u6574\u5408\u6765\u81ea\u4e0d\u540c\u5206\u652f\u7684\u4fee\u6539\u4e3b\u8981\u6709\u4e24\u79cd\u65b9\u6cd5\uff1amerge \u4ee5\u53ca rebase\u3002\u90a3\u4e48\u5e94\u8be5\u4f7f\u7528 Git me&#8230;<\/p>\n","protected":false},"author":1,"featured_media":978,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[52],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Git merge ? \u8fd8\u662f Git rebase ? - \u7801\u5148\u751f\u7684\u535a\u5ba2<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Git merge ? \u8fd8\u662f Git rebase ? - \u7801\u5148\u751f\u7684\u535a\u5ba2\" \/>\n<meta property=\"og:description\" content=\"\u5728 Git \u4e2d\u6574\u5408\u6765\u81ea\u4e0d\u540c\u5206\u652f\u7684\u4fee\u6539\u4e3b\u8981\u6709\u4e24\u79cd\u65b9\u6cd5\uff1amerge \u4ee5\u53ca rebase\u3002\u90a3\u4e48\u5e94\u8be5\u4f7f\u7528 Git me...\" \/>\n<meta property=\"og:url\" content=\"http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/\" \/>\n<meta property=\"og:site_name\" content=\"\u7801\u5148\u751f\u7684\u535a\u5ba2\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-08T16:14:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-03T12:05:31+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/codermr.com\/wp-content\/uploads\/2023\/04\/git-rebase-merge1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"869\" \/>\n\t<meta property=\"og:image:height\" content=\"725\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u7801\u5148\u751f\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/mrcode2021\" \/>\n<meta name=\"twitter:site\" content=\"@mrcode2021\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u7801\u5148\u751f\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/\"},\"author\":{\"name\":\"\u7801\u5148\u751f\",\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf\"},\"headline\":\"Git merge ? \u8fd8\u662f Git rebase ?\",\"datePublished\":\"2023-04-08T16:14:55+00:00\",\"dateModified\":\"2025-03-03T12:05:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/\"},\"wordCount\":100,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf\"},\"articleSection\":[\"\u7f16\u7a0b\u5de5\u5177\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/\",\"url\":\"http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/\",\"name\":\"Git merge ? \u8fd8\u662f Git rebase ? - \u7801\u5148\u751f\u7684\u535a\u5ba2\",\"isPartOf\":{\"@id\":\"http:\/\/codermr.com\/#website\"},\"datePublished\":\"2023-04-08T16:14:55+00:00\",\"dateModified\":\"2025-03-03T12:05:31+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"http:\/\/codermr.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Git merge ? \u8fd8\u662f Git rebase ?\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/codermr.com\/#website\",\"url\":\"http:\/\/codermr.com\/\",\"name\":\"\u7801\u5148\u751f\u7684\u535a\u5ba2\",\"description\":\"\u6b22 \u8fce \u4e0b \u8f7d \u6211 \u5f00 \u53d1 \u7684 \u5404 \u7aef \u8f6f \u4ef6 \u548c APP\",\"publisher\":{\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/codermr.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf\",\"name\":\"\u7801\u5148\u751f\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/codermr.com\/wp-content\/uploads\/2023\/02\/wukong.jpg\",\"contentUrl\":\"http:\/\/codermr.com\/wp-content\/uploads\/2023\/02\/wukong.jpg\",\"width\":400,\"height\":400,\"caption\":\"\u7801\u5148\u751f\"},\"logo\":{\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/codermr.com\",\"https:\/\/twitter.com\/https:\/\/twitter.com\/mrcode2021\"],\"url\":\"http:\/\/codermr.com\/index.php\/author\/coderma\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Git merge ? \u8fd8\u662f Git rebase ? - \u7801\u5148\u751f\u7684\u535a\u5ba2","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/","og_locale":"zh_CN","og_type":"article","og_title":"Git merge ? \u8fd8\u662f Git rebase ? - \u7801\u5148\u751f\u7684\u535a\u5ba2","og_description":"\u5728 Git \u4e2d\u6574\u5408\u6765\u81ea\u4e0d\u540c\u5206\u652f\u7684\u4fee\u6539\u4e3b\u8981\u6709\u4e24\u79cd\u65b9\u6cd5\uff1amerge \u4ee5\u53ca rebase\u3002\u90a3\u4e48\u5e94\u8be5\u4f7f\u7528 Git me...","og_url":"http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/","og_site_name":"\u7801\u5148\u751f\u7684\u535a\u5ba2","article_published_time":"2023-04-08T16:14:55+00:00","article_modified_time":"2025-03-03T12:05:31+00:00","og_image":[{"width":869,"height":725,"url":"http:\/\/codermr.com\/wp-content\/uploads\/2023\/04\/git-rebase-merge1.jpg","type":"image\/jpeg"}],"author":"\u7801\u5148\u751f","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/mrcode2021","twitter_site":"@mrcode2021","twitter_misc":{"\u4f5c\u8005":"\u7801\u5148\u751f","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/#article","isPartOf":{"@id":"http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/"},"author":{"name":"\u7801\u5148\u751f","@id":"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf"},"headline":"Git merge ? \u8fd8\u662f Git rebase ?","datePublished":"2023-04-08T16:14:55+00:00","dateModified":"2025-03-03T12:05:31+00:00","mainEntityOfPage":{"@id":"http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/"},"wordCount":100,"commentCount":0,"publisher":{"@id":"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf"},"articleSection":["\u7f16\u7a0b\u5de5\u5177"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/","url":"http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/","name":"Git merge ? \u8fd8\u662f Git rebase ? - \u7801\u5148\u751f\u7684\u535a\u5ba2","isPartOf":{"@id":"http:\/\/codermr.com\/#website"},"datePublished":"2023-04-08T16:14:55+00:00","dateModified":"2025-03-03T12:05:31+00:00","breadcrumb":{"@id":"http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/codermr.com\/index.php\/2023\/04\/09\/gitmerge-or-gitrebase\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"http:\/\/codermr.com\/"},{"@type":"ListItem","position":2,"name":"Git merge ? \u8fd8\u662f Git rebase ?"}]},{"@type":"WebSite","@id":"http:\/\/codermr.com\/#website","url":"http:\/\/codermr.com\/","name":"\u7801\u5148\u751f\u7684\u535a\u5ba2","description":"\u6b22 \u8fce \u4e0b \u8f7d \u6211 \u5f00 \u53d1 \u7684 \u5404 \u7aef \u8f6f \u4ef6 \u548c APP","publisher":{"@id":"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/codermr.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf","name":"\u7801\u5148\u751f","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/codermr.com\/#\/schema\/person\/image\/","url":"http:\/\/codermr.com\/wp-content\/uploads\/2023\/02\/wukong.jpg","contentUrl":"http:\/\/codermr.com\/wp-content\/uploads\/2023\/02\/wukong.jpg","width":400,"height":400,"caption":"\u7801\u5148\u751f"},"logo":{"@id":"http:\/\/codermr.com\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/codermr.com","https:\/\/twitter.com\/https:\/\/twitter.com\/mrcode2021"],"url":"http:\/\/codermr.com\/index.php\/author\/coderma\/"}]}},"_links":{"self":[{"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/posts\/959"}],"collection":[{"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/comments?post=959"}],"version-history":[{"count":15,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/posts\/959\/revisions"}],"predecessor-version":[{"id":1425,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/posts\/959\/revisions\/1425"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/media\/978"}],"wp:attachment":[{"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/media?parent=959"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/categories?post=959"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/tags?post=959"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}