{"id":2044,"date":"2022-03-18T08:50:52","date_gmt":"2022-03-18T00:50:52","guid":{"rendered":"https:\/\/www.yusian.com\/blog\/?p=2044"},"modified":"2022-03-18T08:50:52","modified_gmt":"2022-03-18T00:50:52","slug":"git%e4%b8%ad%e4%b8%8epull%e4%b8%8epush%e7%9b%b8%e5%85%b3%e7%9a%84%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"https:\/\/www.yusian.com\/blog\/other\/2022\/03\/18\/0850522044.html","title":{"rendered":"Git\u4e2d\u4e0epull\u4e0epush\u76f8\u5173\u7684\u547d\u4ee4"},"content":{"rendered":"<h2>\u5173\u8054\u5206\u652f<\/h2>\n<ul>\n<li>\u5c06\u5f53\u524d\u5206\u652f\u4e0e\u8fdc\u7a0b\u5206\u652f\u5173\u8054\uff0c\u5982\uff1a\u5c06\u5f53\u524d\u5206\u652f\u4e0e\u8fdc\u7a0b\u4e2d\u7684xxx\u5206\u652f\u5173\u8054<\/li>\n<\/ul>\n<pre><code class=\"language-git line-numbers\">$ git push -u origin xxx\n<\/code><\/pre>\n<h2>pull<\/h2>\n<ul>\n<li>\u62c9\u53d6\u5f53\u524d\u5206\u652f\uff0c\u9ed8\u8ba4\u62c9\u53d6\u8fdc\u7a0b\u5173\u8054\u5206\u652f<\/li>\n<\/ul>\n<pre><code class=\"language-git line-numbers\">$ git pull\n<\/code><\/pre>\n<ul>\n<li>\u62c9\u53d6\u5176\u4ed6\u5206\u652f\u5230\u5f53\u524d\u5206\u652f\uff0c<code>git pull origin &lt;\u8fdc\u7a0b\u5206\u652f&gt;<\/code>\uff0c\u5982\uff1a\u62c9\u53d6\u8fdc\u7a0bmaster\u5206\u652f\u5230\u5f53\u524d\u5206\u652f<\/li>\n<\/ul>\n<pre><code class=\"language-git line-numbers\">$ git pull origin master\n<\/code><\/pre>\n<ul>\n<li>\u62c9\u53d6\u5176\u4ed6\u5206\u652f\u5230\u5176\u4ed6\u5206\u652f\uff0c<code>git pull origin &lt;\u8fdc\u7a0b\u5206\u652f&gt;:&lt;\u672c\u5730\u5206\u652f&gt;<\/code>\uff0c\u5982\uff1a\u62c9\u53d6\u8fdc\u7a0bmaster\u5206\u652f\u5230\u672c\u5730daily\/2.0.0\u5206\u652f<\/li>\n<\/ul>\n<pre><code class=\"language-git line-numbers\">$ git pull origin master:daily-2.0.0\n<\/code><\/pre>\n<h2>push<\/h2>\n<ul>\n<li>\u63a8\u9001\u5f53\u524d\u5206\u652f\uff0c\u9ed8\u8ba4\u63a8\u9001\u5230\u8fdc\u7a0b\u5173\u8054\u5206\u652f<\/li>\n<\/ul>\n<pre><code class=\"language-git line-numbers\">$ git push\n<\/code><\/pre>\n<ul>\n<li>\u63a8\u9001\u6307\u5b9a\u5206\u652f\u5230\u8fdc\u7a0b\u5173\u8054\u5206\u652f\uff0cgit push origin &lt;\u672c\u5730\u5206\u652f>\uff0c\u5982\uff1a\u63a8\u9001master\u5206\u652f<\/li>\n<\/ul>\n<pre><code class=\"language-git line-numbers\">$ git push origin master\n<\/code><\/pre>\n<ul>\n<li>\u63a8\u9001\u6307\u5b9a\u5206\u652f\u5230\u8fdc\u7a0b\u6307\u5b9a\u5206\u652f\uff0cgit push origin &lt;\u672c\u5730\u5206\u652f>:&lt;\u8fdc\u7a0b\u5206\u652f><\/li>\n<\/ul>\n<pre><code class=\"language-git line-numbers\">$ git push origin daily-2.0.0:daily-2.0.0\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5173\u8054\u5206\u652f \u5c06\u5f53\u524d\u5206\u652f\u4e0e\u8fdc\u7a0b\u5206\u652f\u5173\u8054\uff0c\u5982\uff1a\u5c06\u5f53\u524d\u5206\u652f\u4e0e\u8fdc\u7a0b\u4e2d\u7684xxx\u5206\u652f\u5173\u8054 $ git push -u origin xxx pull \u62c9\u53d6\u5f53\u524d\u5206\u652f\uff0c\u9ed8\u8ba4\u62c9\u53d6\u8fdc\u7a0b\u5173\u8054\u5206\u652f $ git pull \u62c9\u53d6\u5176\u4ed6\u5206\u652f\u5230\u5f53\u524d\u5206\u652f\uff0cgit pull origin &lt;\u8fdc\u7a0b\u5206\u652f&gt;\uff0c\u5982\uff1a\u62c9\u53d6\u8fdc\u7a0bmaster\u5206\u652f\u5230\u5f53\u524d\u5206\u652f $ git pull origin master \u62c9\u53d6\u5176\u4ed6\u5206\u652f\u5230\u5176\u4ed6\u5206\u652f\uff0cgit pull origin &lt;\u8fdc\u7a0b\u5206\u652f&gt;:&lt;\u672c\u5730\u5206\u652f&gt;\uff0c\u5982\uff1a\u62c9\u53d6\u8fdc\u7a0bmaster\u5206\u652f\u5230\u672c\u5730daily\/2.0.0\u5206\u652f $ git pull origin master:daily-2.0.0 push \u63a8\u9001\u5f53\u524d\u5206\u652f\uff0c\u9ed8\u8ba4\u63a8\u9001\u5230\u8fdc\u7a0b\u5173\u8054\u5206\u652f $ git push \u63a8\u9001\u6307\u5b9a\u5206\u652f\u5230\u8fdc\u7a0b\u5173\u8054\u5206\u652f\uff0cgit push origin &lt;\u672c\u5730\u5206\u652f>\uff0c\u5982\uff1a\u63a8\u9001master\u5206\u652f $ git push origin master \u63a8\u9001\u6307\u5b9a\u5206\u652f\u5230\u8fdc\u7a0b\u6307\u5b9a\u5206\u652f\uff0cgit push origin &lt;\u672c\u5730\u5206\u652f>:&lt;\u8fdc\u7a0b\u5206\u652f> $ git push origin daily-2.0.0:daily-2.0.0<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49],"tags":[47,379,378],"class_list":["post-2044","post","type-post","status-publish","format-standard","hentry","category-other","tag-git","tag-pull","tag-push"],"_links":{"self":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/2044","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/comments?post=2044"}],"version-history":[{"count":0,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/2044\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/media?parent=2044"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/categories?post=2044"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/tags?post=2044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}