{"id":187282,"date":"2020-11-02T02:20:34","date_gmt":"2020-11-01T18:20:34","guid":{"rendered":"http:\/\/4563.org\/?p=187282"},"modified":"2020-11-02T02:20:34","modified_gmt":"2020-11-01T18:20:34","slug":"git-merge-%e5%ba%95%e5%b1%82%e9%80%bb%e8%be%91%e6%98%af%e4%bb%80%e4%b9%88","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=187282","title":{"rendered":"git merge \u5e95\u5c42\u903b\u8f91\u662f\u4ec0\u4e48"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  git merge \u5e95\u5c42\u903b\u8f91\u662f\u4ec0\u4e48               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : chaleaoch <\/span>  <span><i><\/i> 3<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u5206\u652f A <img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/11\/20201109_5fa8e320bc95f.png\" alt=\"git merge \u5e95\u5c42\u903b\u8f91\u662f\u4ec0\u4e48\" \/> \u5206\u652f B <img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/11\/20201109_5fa8e325f1ac9.png\" alt=\"git merge \u5e95\u5c42\u903b\u8f91\u662f\u4ec0\u4e48\" \/><\/p>\n<p>\u4ee5\u4e0a\u662f\u540c\u4e00\u4e2a\u6587\u4ef6\u7684 \u4e24\u4e2a\u4ee3\u7801\u7247\u6bb5. git merge A (at B)<\/p>\n<p>\u7136\u800c\u4efb\u4f55\u53d8\u5316\u90fd\u6ca1\u6709\u53d1\u751f. \u5728\u54ea\u79cd\u60c5\u51b5\u4e0b\u4f1a\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5.<\/p>\n<p>\u662f\u4e0d\u662f A \u5206\u652f\u7684 foo.py \u6ca1\u6709\u65b0\u7684 commit \u8bb0\u5f55. \u5c31\u4e0d\u4f1a\u68c0\u67e5 A \u5206\u652f foo.py \u548c B \u5206\u652f foo.py \u7684\u5dee\u522b.<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>9<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4065180\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : BrettD <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             commit \u4e86\u624d\u4f1a\u5408\u5e76\u554a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4065181\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : nightwitch <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             git \u7684\u8fd9\u4e9b\u64cd\u4f5c\u90fd\u662f\u4ee5 commit \u4f5c\u4e3a\u5355\u4f4d\uff0c\u800c\u4e0d\u662f\u4ee5\u6587\u4ef6\u505a\u5355\u4f4d\u3002\u5fc5\u987b\u8981\u628a\u6539\u52a8 commit \u4e86\uff0c\u5176\u4ed6\u5206\u652f\u624d\u80fd\u5408\u5e76 \/\u53d8\u57fa                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4065182\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : chaleaoch <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @nightwitch <br \/>@BrettD <\/p>\n<p>commit \u4e86 \u90fd commit \u4e86.                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4065183\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : chaleaoch <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u90fd\u662f\u5e72\u51c0\u7684\u4e24\u4e2a\u5206\u652f.                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4065184\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : BrettD <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7a81\u7136\u6ca1\u770b\u61c2\u4e3b\u5728\u8bf4\u5565                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4065185\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : shawndev <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             FYI https:\/\/www.atlassian.com\/git\/tutorials\/using-branches\/git-merge<br \/>\u5efa\u8bae\u516c\u4f17\u53f7\u5173\u6ce8\u4e0b\u201c\u6668\u6653\u201d\uff0c\u67e5\u770b\u300a\u5b66\u4f1a git\uff0c\u770b\u8fd9\u7bc7\u5c31\u591f\u4e86\u300b\u4e13\u9898\u6587\u7ae0\u6df1\u5165\u5b66\u4e60\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4065186\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : aijam <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f30\u8ba1 lz \u662f C1 -&gt; C2 \u3002C1 \u662f branch A\uff0cC2 \u662f branch B \u3002<br \/>git merge A \u5c31\u4f1a\u663e\u793a\u201cAlready up to date.\u201d                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4065187\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : no1xsyzy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             A -&gt; commits &#8230; -&gt; B \u7684\u8bdd\uff0ccheckout B merge A \u4e0d\u4f1a\u751f\u6548\uff0ccheckout A merge B \u4f1a fast-forward \u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4065188\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xzysaber <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60 A \u5206\u652f\u4e0a\u7684\u6700\u65b0\u63d0\u4ea4\u5e94\u8be5\u5df2\u7ecf\u5b58\u5728\u4e8e\u5206\u652f B \u4e86\u3002<br \/>\u4f60\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4:<br \/>git differ B..A <br \/>\u67e5\u770b A \u5206\u652f\u5b58\u5728\u800c B \u5206\u652f\u4e0d\u5b58\u5728\u7684\u63d0\u4ea4\uff0c\u5e94\u8be5\u662f\u4e0d\u5b58\u5728\u7684\uff08\u6b63\u5e38\u60c5\u51b5\uff09\u3002<br \/>\u8fd8\u6709\u5206\u652f\u51fa\u73b0\u5206\u53c9\u65f6\u4f1a\u6d89\u53ca\u4e09\u8def\u5408\u5e76\uff0c\u53ef\u4ee5\u4e86\u89e3\u4e0b\u8fd9\u4e2a\u673a\u5236\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>git merge \u5e95\u5c42\u903b\u8f91\u662f\u4ec0\u4e48&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/187282"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=187282"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/187282\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=187282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=187282"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=187282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}