{"id":335,"date":"2024-10-25T14:19:51","date_gmt":"2024-10-25T06:19:51","guid":{"rendered":"https:\/\/www.cgh0610.cn\/?p=335"},"modified":"2024-10-25T14:19:51","modified_gmt":"2024-10-25T06:19:51","slug":"%e4%bf%9d%e7%95%99%e6%9c%ac%e5%9c%b0%e5%88%86%e6%94%af-%e5%85%88%e6%8b%89%e5%8e%bb%e8%bf%9c%e7%a8%8bmaster%e4%bb%a3%e7%a0%81","status":"publish","type":"post","link":"https:\/\/www.cgh0610.cn\/?p=335","title":{"rendered":"\u4fdd\u7559\u672c\u5730\u5206\u652f \u5148\u62c9\u53bb\u8fdc\u7a0bmaster\u4ee3\u7801"},"content":{"rendered":"<p>\u8981\u4fdd\u7559\u4f60\u5f53\u524d\u5206\u652f\uff08B\u5206\u652f\uff09\u4e0a\u7684\u7f16\u8f91\u5185\u5bb9\uff0c\u5e76\u4e14\u5c06\u8fdc\u7a0b\u4ed3\u5e93\u4e2d master \u5206\u652f\u7684\u6700\u65b0\u4ee3\u7801\u540c\u6b65\u5230\u672c\u5730\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u8fdb\u884c\u64cd\u4f5c\uff1a<\/p>\n<h5>\u63a8\u8350\u505a\u6cd5\uff1a\u62c9\u53d6\u5230 master \u5206\u652f\u518d\u5408\u5e76\u5230 B \u5206\u652f<\/h5>\n<ol>\n<li>\u67e5\u770b\u672c\u5730\u5206\u652fB\u662f\u5426\u6709\u672a\u63d0\u4ea4\u66f4\u6539\n<ul>\n<li>\u9996\u5148\u786e\u4fdd\u5f53\u524dB\u5206\u652f\u4e0a\u6709\u65e0\u672a\u63d0\u4ea4\u66f4\u6539.<br \/>\n<code>git status<\/code><\/li>\n<\/ul>\n<\/li>\n<li>\u6682\u5b58\u672a\u63d0\u4ea4\u7684\u66f4\u6539\n<ul>\n<li>\u5982\u679c\u6709\u672a\u63d0\u4ea4\u7684\u66f4\u6539\uff0c\u53ef\u4ee5\u4f7f\u7528 git stash \u547d\u4ee4\u6765\u6682\u5b58\u8fd9\u4e9b\u66f4\u6539\u3002<br \/>\n<code>git stash save \"\u5907\u6ce8\"<\/code><\/li>\n<li>\u6216\u8005\u7b80\u5316\u547d\u4ee4:<br \/>\n<code>git stash<\/code><\/li>\n<\/ul>\n<\/li>\n<li>\u5207\u6362\u5230master\u5206\u652f\n<ul>\n<li>\u5207\u6362\u5230master\u5206\u652f<br \/>\n<code>git checkout master<\/code><\/li>\n<\/ul>\n<\/li>\n<li>\u62c9\u53bb\u8fdc\u7a0bmaster\u5206\u652f\u7684\u6700\u65b0\u4ee3\u7801\n<ul>\n<li>\u786e\u4fdd\u4f60\u7684git\u914d\u7f6e\u4e86\u6b63\u786e\u7684\u8fdc\u7a0b\u4ed3\u5e93,\u901a\u5e38\u662forigin,\u7136\u540e\u4ece\u8fdc\u7a0b\u4ed3\u5e93\u62c9\u53bb\u6700\u65b0\u7684master\u5206\u652f<br \/>\n<code>git fetch origin master<\/code><\/li>\n<\/ul>\n<\/li>\n<li>\u5207\u6362\u56deB\u5206\u652f\n<ul>\n<li>\u62c9\u53d6\u5b8cmaster\u5206\u652f\u540e,\u518d\u6b21\u5207\u6362\u56de\u4f60\u7684B\u5206\u652f.<br \/>\n<code>git checkout B<\/code><\/li>\n<\/ul>\n<\/li>\n<li>\u5408\u5e76master\u5206\u652f\u5230B\u5206\u652f\n<ul>\n<li>\u5c06 master \u5206\u652f\u7684\u6700\u65b0\u63d0\u4ea4\u5408\u5e76\u5230 B \u5206\u652f\u3002<br \/>\n<code>git merge origin\/master<\/code><\/li>\n<\/ul>\n<\/li>\n<li>\u89e3\u51b3\u53ef\u80fd\u7684\u51b2\u7a81\n<ul>\n<li>\u5982\u679c\u5408\u5e76\u540e\u6709\u51b2\u7a81,\u9700\u8981\u624b\u52a8\u89e3\u51b3\u8fd9\u4e9b\u51b2\u7a81<br \/>\n<code>git add.<\/code><br \/>\n<code>git commit -m '\u5907\u6ce8'<\/code><\/li>\n<\/ul>\n<\/li>\n<li>\u6062\u590dB\u5206\u652f\u6682\u5b58\u7684\u66f4\u6539\n<ul>\n<li>\u4f7f\u7528 git stash apply \u6216 git stash pop \u6765\u6062\u590d\u6682\u5b58\u7684\u66f4\u6539\u3002<br \/>\n<code>git stash apply<\/code><\/li>\n<li>\u6216\u8005\u7b80\u5316\u547d\u4ee4<br \/>\n<code>git stash pop<\/code><\/li>\n<li>git stash apply \u4f1a\u6062\u590d\u6682\u5b58\u7684\u5185\u5bb9\uff0c\u5e76\u4fdd\u7559\u6682\u5b58\u7684\u72b6\u6001\uff0c\u4ee5\u4fbf\u591a\u6b21\u6062\u590d\u3002git stash pop \u5219\u4f1a\u6062\u590d\u6682\u5b58\u7684\u5185\u5bb9\uff0c\u5e76\u79fb\u9664\u6682\u5b58\u6761\u76ee\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u89e3\u51b3\u53ef\u80fd\u7684\u51b2\u7a81\n<ul>\n<li>\u5982\u679c\u6062\u590d\u6682\u5b58\u533a\u5185\u5bb9\u540e\u6709\u51b2\u7a81,\u9700\u8981\u624b\u52a8\u89e3\u51b3\u8fd9\u4e9b\u51b2\u7a81.\u89e3\u51b3\u51b2\u7a81\u540e,\u7ee7\u7eed\u63d0\u4ea4\u5408\u5e76\u7684\u7ed3\u679c<br \/>\n<code>git add.<\/code><br \/>\n<code>git commit -m '\u5907\u6ce8'<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<ul>\n<li>\u4f7f\u7528\u8fd9\u79cd\u65b9\u6cd5\u53ef\u4ee5\u4fdd\u6301\u5206\u652f\u5386\u53f2\u66f4\u52a0\u6e05\u6670,\u907f\u514d\u4e0d\u5fc5\u8981\u7684\u5408\u5e76\u63d0\u4ea4,\u4e14\u53ef\u4ee5\u66f4\u5bb9\u6613\u5730\u8ffd\u8e2a\u53d8\u66f4\u5386\u53f2<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u8981\u4fdd\u7559\u4f60\u5f53\u524d\u5206\u652f\uff08B\u5206\u652f\uff09\u4e0a\u7684\u7f16\u8f91\u5185\u5bb9\uff0c\u5e76\u4e14\u5c06\u8fdc\u7a0b\u4ed3\u5e93\u4e2d master \u5206\u652f\u7684\u6700\u65b0\u4ee3\u7801\u540c\u6b65\u5230\u672c\u5730\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b &hellip; <a href=\"https:\/\/www.cgh0610.cn\/?p=335\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u4fdd\u7559\u672c\u5730\u5206\u652f \u5148\u62c9\u53bb\u8fdc\u7a0bmaster\u4ee3\u7801<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"aside","meta":[],"categories":[77],"tags":[],"_links":{"self":[{"href":"https:\/\/www.cgh0610.cn\/index.php?rest_route=\/wp\/v2\/posts\/335"}],"collection":[{"href":"https:\/\/www.cgh0610.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cgh0610.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cgh0610.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cgh0610.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=335"}],"version-history":[{"count":1,"href":"https:\/\/www.cgh0610.cn\/index.php?rest_route=\/wp\/v2\/posts\/335\/revisions"}],"predecessor-version":[{"id":337,"href":"https:\/\/www.cgh0610.cn\/index.php?rest_route=\/wp\/v2\/posts\/335\/revisions\/337"}],"wp:attachment":[{"href":"https:\/\/www.cgh0610.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=335"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cgh0610.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=335"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cgh0610.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=335"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}