{"id":210661,"date":"2021-02-11T10:14:24","date_gmt":"2021-02-11T02:14:24","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=210661"},"modified":"2021-01-28T09:15:03","modified_gmt":"2021-01-28T01:15:03","slug":"git-master-linux","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/git-master-linux.html","title":{"rendered":"\u7b80\u5355\u4ecb\u7ecdGit\u5408\u5e76\u5206\u652f\u7684\u6d41\u7a0b\u6b65\u9aa4"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u8fd9\u7bc7\u6587\u7ae0\u4e3b\u8981\u4ecb\u7ecd\u4e86\u8be6\u89e3Git\u5408\u5e76\u5206\u652f\u7684\u6d41\u7a0b\u6b65\u9aa4\uff0c\u6587\u4e2d\u901a\u8fc7\u793a\u4f8b\u4ee3\u7801\u4ecb\u7ecd\u7684\u975e\u5e38\u8be6\u7ec6\uff0c\u5bf9\u5927\u5bb6\u7684\u5b66\u4e60\u6216\u8005\u5de5\u4f5c\u5177\u6709\u4e00\u5b9a\u7684\u53c2\u8003\u5b66\u4e60\u4ef7\u503c\uff0c\u9700\u8981\u7684\u670b\u53cb\u4eec\u4e0b\u9762\u968f\u7740\u5c0f\u7f16\u6765\u4e00\u8d77\u5b66\u4e60\u5b66\u4e60\u5427<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\u6b63\u5e38\u5408\u5e76\u5206\u652fdev\u5230master\u6d41\u7a0b\uff1a<\/strong><\/div>\n

(\u5408\u5e76\u5230\u5176\u4ed6\u5206\u652f\u7c7b\u4f3c\u54c8)<\/p>\n

1\u3001\u8981\u5408\u5e76\u7684dev\u5206\u652f\u5148\u66f4\u65b0\u63d0\u4ea4\u6240\u6709\u6587\u4ef6<\/p>\n

\u6ce8\u610f\uff1a \u5982\u679c\u4e0d\u9700\u8981\u63d0\u4ea4\u7684\u672c\u5730\u5316\u4fee\u6539\u6587\u4ef6\u7684\u8bdd\uff0c\u6700\u597d\u4e0d\u8981\u63d0\u4ea4\u4e0a\u53bb\u3002\u4e34\u65f6\u5907\u4efd\u7136\u540e\u5220\u6389\u6216\u8005\u64a4\u56de\u3002<\/p>\n

\u8fdb\u5165\u9879\u76ee\u6839\u76ee\u5f55\uff0c\u7136\u540e\u6267\u884c\uff1a<\/p>\n

\r\ngit add .\r\ngit commit -m '\u63d0\u4ea4\u6240\u6709dev\u5206\u652f\u7684\u6587\u4ef6'\r\ngit push -u origin dev<\/pre>\n

2\u3001\u5207\u6362\u5230master\u5206\u652f<\/p>\n

git checkout master<\/pre>\n

3\u3001\u66f4\u65b0master\u4ee3\u7801\u5230\u6700\u65b0<\/p>\n

git pull origin master<\/pre>\n

4\u3001\u628adev\uff08\u4f60\u8981\u5408\u5e76\u5230master\u7684\u57fa\u5206\u652f\uff09\u5206\u652f\u7684\u4ee3\u7801\u5408\u5e76\u5230master\u4e0a<\/p>\n

git merge dev<\/pre>\n

5\u3001\u67e5\u770b\u72b6\u6001<\/p>\n

git status<\/pre>\n

\u8f93\u51fa\u5982\u4e0b\uff1a\u8868\u793a\u67096\u4e2a\u63d0\u4ea4\u9700\u8981\u5408\u5e76\u3002<\/p>\n

On branch master\r\nYour branch is ahead of 'origin\/master' by 6 commits.\r\n(use \"git push\" to publish your local commits)\r\nnothing to commit, working tree clean<\/pre>\n

6\u3001push\u5230\u8fdc\u7a0bmaster\u4e0a\uff08\u9700\u8981master\u6743\u9650\uff09<\/p>\n

git push origin master<\/pre>\n
\u95ee\u9898\uff1a<\/strong><\/span><\/div>\n

1\u3001\u6267\u884cgit merge dev\u63d0\u793a\u5982\u4e0b\uff1a<\/p>\n

\r\nmerge: dev - not something we can merge<\/pre>\n
\u53ef\u80fd\u7684\u539f\u56e0\uff1a<\/strong><\/span><\/div>\n

1\u3001\u771f\u7684\u6ca1\u4ec0\u4e48\u9700\u8981\u5408\u5e76\u7684\u5185\u5bb9<\/p>\n

2\u3001\u5206\u652f\u540d\u5199\u9519\u4e86\uff0c\u6838\u5bf9\u4e0b\u3002<\/p>\n

\u5230\u6b64\u8fd9\u7bc7\u5173\u4e8e\u8be6\u89e3Git\u5408\u5e76\u5206\u652f\u7684\u6d41\u7a0b\u6b65\u9aa4\u7684\u6587\u7ae0\u5c31\u4ecb\u7ecd\u5230\u8fd9\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

(\u5408\u5e76\u5230\u5176\u4ed6\u5206\u652f\u7c7b\u4f3c\u54c8) 1\u3001\u8981\u5408\u5e76\u7684dev\u5206\u652f\u5148\u66f4\u65b0\u63d0\u4ea4\u6240\u6709\u6587\u4ef6 \u6ce8\u610f\uff1a \u5982\u679c\u4e0d\u9700\u8981\u63d0\u4ea4\u7684\u672c\u5730\u5316\u4fee\u6539\u6587\u4ef6\u7684\u8bdd […]<\/p>\n","protected":false},"author":1482,"featured_media":95067,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-210661","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/210661","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1482"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=210661"}],"version-history":[{"count":5,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/210661\/revisions"}],"predecessor-version":[{"id":210666,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/210661\/revisions\/210666"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/95067"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=210661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=210661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=210661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}