{"id":138183,"date":"2020-07-21T05:19:08","date_gmt":"2020-07-20T21:19:08","guid":{"rendered":"http:\/\/4563.org\/?p=138183"},"modified":"2020-07-21T05:19:08","modified_gmt":"2020-07-20T21:19:08","slug":"git-%e5%a6%82%e4%bd%95%e4%bb%8e%e8%87%aa%e5%b7%b1%e7%9a%84%e4%bb%93%e5%ba%93%e6%8f%90%e5%88%b0%e5%8f%a6%e5%a4%96%e4%b8%80%e4%b8%aa%e4%bb%93%e5%ba%93","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=138183","title":{"rendered":"Git \u5982\u4f55\u4ece\u81ea\u5df1\u7684\u4ed3\u5e93\u63d0\u5230\u53e6\u5916\u4e00\u4e2a\u4ed3\u5e93"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  Git \u5982\u4f55\u4ece\u81ea\u5df1\u7684\u4ed3\u5e93\u63d0\u5230\u53e6\u5916\u4e00\u4e2a\u4ed3\u5e93               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : monetto <\/span>  <span><i><\/i> 6<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u9879\u76ee\u540d\u5b57\u53eb app \u9996\u5148\u6211\u5728\u6211\u81ea\u5df1\u7684\u4ed3\u5e93\u4e2d\u5efa\u7acb\u4e86\u4e00\u4e2a\u65b0\u7684 Repository [email&#160;protected]:my\/app.git<\/p>\n<p>\u7136\u540e\u6211\u4eec\u516c\u53f8\u7684\u4ee3\u7801\u662f [email&#160;protected]:company\/app.git<\/p>\n<p>\u6211\u5728\u6211\u4eec\u516c\u53f8\u7684\u4ee3\u7801\u4e0a\u65b0\u5efa\u4e86\u4e00\u4e2a\u5206\u652f my_branch<\/p>\n<p>\u7136\u540e\u4f7f\u7528\u8fd9\u4e2a\u547d\u4ee4 git remote add myrep [email&#160;protected]:my\/app.git git push -u myrep<\/p>\n<p>\u7136\u540e\u73b0\u5728\u6211\u60f3\u8981\u63d0\u4ea4\u6211\u7684 PR \u6211\u5728\u6211\u516c\u53f8\u7684 Web \u7aef\u6ca1\u770b\u5230\u63d0 PR \u7684\u9009\u9879&#8230; \u53ea\u80fd\u4ece [email&#160;protected]:my\/app.git \u63d0\u4ea4\u5230\u5b83\u672c\u8eab\uff0c\u5237\u4e0d\u51fa\u6765 [email&#160;protected]:company\/app.git<\/p>\n<p>\u73b0\u5728\u6211\u60f3\u95ee\u4e00\u4e0b\u600e\u4e48\u624d\u80fd\u4ece\u6211\u81ea\u5df1\u7684\u4ed3\u5e93 [email&#160;protected]:my\/app.git \u63d0\u4ea4\u5230\u516c\u53f8\u7684\u4ed3\u5e93 [email&#160;protected]:company\/app.git<\/p>\n<p>\u662f\u9700\u8981 git remote \u6dfb\u52a0\u4ec0\u4e48\u5417<\/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=\"2569637\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : baiyi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u662f\u60f3\u5728 compony\/app \u4e0a\u63d0\u4ea4 my\/app \u4ed3\u5e93\u5206\u652f\u7684 PR \u5417\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2569638\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : chairuosen <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             pr \/ mr \u4e0d\u662f git \u7684\u529f\u80fd\u3002\u65f6 gitlab\/github \u8f6f\u4ef6\u7684\u529f\u80fd                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2569639\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : chairuosen <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @chairuosen #2 \u4e24\u4e2a\u9879\u76ee\u4e0d\u80fd\u662f\u7eaf git \u63d0\u4ea4\u4e24\u4e2a remote \u7684\u5173\u7cfb\uff0c\u5f97\u662f\u7f51\u7ad9\u91cc\u7684 fork \u5173\u7cfb\uff0c\u8fd9\u6837\u5728 mr \u7684\u9875\u9762\u91cc\u5c31\u80fd\u770b\u5230\u4e24\u4e2a\u9879\u76ee\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2569640\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : monetto <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @chairuosen \u56e0\u4e3a\u516c\u53f8\u81ea\u5df1\u7684 git web \u7aef\u6ca1\u6709 fork \u529f\u80fd\uff0c\u6211\u5c31\u8fd9\u6837\u505a\u4e86\u4e00\u4e0b\uff0c\u4f46\u662f\u63d0\u4ea4\u5408\u5e76\u8bf7\u6c42\u65f6\u5019\u5c31\u770b\u4e0d\u89c1\u4e86&#8230;\u8fd9\u4e2a\u73b0\u5728\u548b\u529e\u554a \u56e7                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2569641\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : monetto <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @baiyi \u5bf9\uff0c\u6211\u81ea\u5df1\u66f4\u65b0\u4e86 [email&#160;protected]:my\/app.git \u7684\u4ee3\u7801\uff0c\u6211\u60f3\u63d0\u4ea4\u5230 [email&#160;protected]:company\/app.git \uff0c\u7ed3\u679c\u53d1\u73b0 web \u7aef\u5237\u4e0d\u51fa\u6765 [email&#160;protected]:company\/app.git \u7684\u6e90\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2569642\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : chairuosen <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @monetto #4 \u3002\u3002\u4f60\u95ee\u4f60\u516c\u53f8\u7684 IT \u5440\uff0c\u4ec0\u4e48 web \u7aef\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2569643\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : evilrat <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             git remote remove $old_origin;<br \/>git remote add origin $new_repo_url;<br \/>git push origin master &#8211;force;                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2569644\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : fxjson <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53ef\u4ee5\u516c\u53f8\u7684\u9879\u76ee\u4e0a git add submodule                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2569645\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : baiyi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @monetto #5 pr \u4e0d\u662f git \u7684\u529f\u80fd\uff0c\u5982\u679c\u4f60\u516c\u53f8\u7528\u7684 git web \u5b58\u50a8\u6ca1\u6709\u63d0\u4f9b\u5c31\u4e0d\u80fd\u7528\u3002\u4f60\u53ef\u4ee5\u5c06 my\/app \u7684\u5206\u652f\u6dfb\u52a0 remote\uff0c\u63d0\u4ea4\u5230 compony\/app\uff0c\u7136\u540e\u5728 compony\/app \u4e2d\u63d0\u4ea4 pr                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>Git \u5982\u4f55\u4ece\u81ea\u5df1\u7684\u4ed3\u5e93\u63d0\u5230\u53e6\u5916\u4e00&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\/138183"}],"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=138183"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/138183\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=138183"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=138183"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=138183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}