{"id":18858,"date":"2023-05-15T10:44:33","date_gmt":"2023-05-15T02:44:33","guid":{"rendered":"https:\/\/www.wqeq.com\/?p=18858"},"modified":"2023-05-15T12:48:29","modified_gmt":"2023-05-15T04:48:29","slug":"git%e5%b8%b8%e7%94%a8%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"https:\/\/www.wqeq.com\/?p=18858","title":{"rendered":"git\u5e38\u7528\u547d\u4ee4"},"content":{"rendered":"<blockquote>\n<p>\u80cc\u666f\uff1a\u4e4b\u6240\u4ee5\u7a81\u7136\u90a3\u8981\u6765\u5199\u6b64\u7bc7\u535a\u6587\uff0c\u662f\u56e0\u4e3a\u53d1\u73b0\u592a\u4f9d\u8d56\u5de5\u5177\u4e86\uff0c\u6ca1\u4e86\u5de5\u5177\u5c31\u5b8c\u5168\u6ca1\u6cd5\u5f00\u53d1\u3002\u4e4b\u524d\u90fd\u662f\u7528\u7684sourcetree\u6765\u7ba1\u7406git\u548c\u9879\u76ee\uff0c\u770b\u5230\u540c\u4e8b\u90fd\u662f\u901a\u8fc7\u547d\u4ee4\u884c\u6572\u6307\u4ee4\uff0c\u53d1\u73b0\u81ea\u5df1\u597dlow\uff0c\u6240\u4ee5\u4ea7\u751f\u4e86\u60f3\u5b66\u7684\u51b2\u52a8\u3002<\/p>\n<\/blockquote>\n<hr \/>\n<p>\u628a\u5e38\u7528\u5230\u7684\u51e0\u4e2a\u573a\u666f\u7684\u547d\u4ee4\u603b\u7ed3\u4e0b<\/p>\n<h1>\u4ece\u8fdc\u7a0b\u62c9\u53d6\u4ee3\u7801\u5230\u672c\u5730<\/h1>\n<p><!--more--><\/p>\n<pre><code class=\"language-shell\">git clone http(s):xxxx.git \/\/\u62c9\u53d6\u8fdc\u7a0b\u4ee3\u7801\u5230\u672c\u5730<\/code><\/pre>\n<h1>\u7b2c\u4e00\u79cd\uff1a\u521b\u5efa\u672c\u5730\u5206\u652f\u5e76\u63a8\u9001\u5230\u8fdc\u7a0b<\/h1>\n<pre><code class=\"language-shell\">git branch xxx; \/\/\u521b\u5efa\u672c\u5730xxx\u5206\u652f\ngit push --set-upstream origin xxx \/\/\u5c06\u672c\u5730\u5206\u652f\u63a8\u9001\u5230\u8fdc\u7a0bxxx\u5206\u652f<\/code><\/pre>\n<h1>\u7b2c\u4e8c\u79cd\uff1a\u521b\u5efa\u672c\u5730\u5206\u652f\u5e76\u5173\u8054\u8fdc\u7a0b\u5206\u652f<\/h1>\n<pre><code class=\"language-shell\">git checkout -b xxx origin\/xxx  \/\/\u901a\u8fc7\u8fdc\u7a0bxxx\u5206\u652f\uff0c\u521b\u5efa\u672c\u5730xxx\u5206\u652f\n<\/code><\/pre>\n<h1>\u5207\u6362\u5206\u652f\u5408\u5e76\u4ee3\u7801<\/h1>\n<pre><code class=\"language-shell\">git branch -a    \/\/\u67e5\u770b\u6240\u6709\u7684\u672c\u5730\u548c\u8fdc\u7a0b\u5206\u652f\ngit branch -d xxx \/\/\u5220\u9664\u5206\u652f\ngit push origin --delete xxx \/\/\u5220\u9664\u8fdc\u7a0b\u5206\u652f\ngit branch xxx   \/\/\u521b\u5efa\u672c\u5730\u5206\u652f\ngit checkout xx  \/\/\u5207\u6362\u5230xxx\u5206\u652f\ngit checkout -b xxx \/\/\u521b\u5efa\u5e76\u5207\u6362\u5230xxx\u5206\u652f\ngit merge xxx   \/\/\u5c06xxx\u5206\u652f\u5408\u5e76\u5230\u5f53\u524d\u5206\u652f<\/code><\/pre>\n<h1>\u62c9\u3001\u63d0\u4ea4\u3001\u63a8\u9001\u4ee3\u7801<\/h1>\n<pre><code class=\"language-shell\">git pull  \/\/\u4ece\u8fdc\u7a0b\u4ed3\u5e93\u62c9\u53d6\u4ee3\u7801\ngit commit \/\/\u63d0\u4ea4\u4ee3\u7801\u5230\u672c\u5730\u4ed3\u5e93\ngit push  \/\/\u5c06\u672c\u5730\u6700\u65b0\u4ee3\u7801\u63d0\u4ea4\u5230\u8fdc\u7a0b\u4ed3\u5e93\n\/\/\u4e0a\u9762\u662f\u6b63\u5e38\u6d41\u7a0b\u62c9\u4ee3\u7801\u89e3\u51b3\u51b2\u7a81\uff0c\u63d0\u4ea4\u672c\u5730\u6700\u65b0\u5e76\u63a8\u9001\u5230\u8fdc\u7a0b\u4ed3\u5e93\n\/\/\u5982\u679c\u5728\u5404\u81ea\u4e0d\u540c\u7684\u5206\u652f\u4e0a\u5f00\u53d1\uff0c\u9700\u8981\u5148\u62c9\u53d6\u8fdc\u7a0b\u4ee3\u7801\u540e\u4fdd\u8bc1\u6700\u65b0\uff0c\u518d\u8fdb\u884c\u5408\u5e76\u5206\u652f\u89e3\u51b3\u51b2\u7a81\u540e\u518d\u63d0\u4ea4\n\/\/\u6bd4\u5982 1.git pull    2.git merge xxx   3.git commit   4.git push<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u80cc\u666f\uff1a\u4e4b\u6240\u4ee5\u7a81\u7136\u90a3\u8981\u6765\u5199\u6b64\u7bc7\u535a\u6587\uff0c\u662f\u56e0\u4e3a\u53d1\u73b0\u592a\u4f9d\u8d56\u5de5\u5177\u4e86\uff0c\u6ca1\u4e86\u5de5\u5177\u5c31\u5b8c\u5168\u6ca1\u6cd5\u5f00\u53d1\u3002\u4e4b\u524d\u90fd\u662f\u7528\u7684sourcetr [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[71],"_links":{"self":[{"href":"https:\/\/www.wqeq.com\/index.php?rest_route=\/wp\/v2\/posts\/18858"}],"collection":[{"href":"https:\/\/www.wqeq.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wqeq.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wqeq.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wqeq.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=18858"}],"version-history":[{"count":2,"href":"https:\/\/www.wqeq.com\/index.php?rest_route=\/wp\/v2\/posts\/18858\/revisions"}],"predecessor-version":[{"id":18863,"href":"https:\/\/www.wqeq.com\/index.php?rest_route=\/wp\/v2\/posts\/18858\/revisions\/18863"}],"wp:attachment":[{"href":"https:\/\/www.wqeq.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18858"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wqeq.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=18858"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wqeq.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=18858"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}