{"id":447,"date":"2023-06-03T10:28:53","date_gmt":"2023-06-03T02:28:53","guid":{"rendered":"https:\/\/niuguodong.com\/?p=447"},"modified":"2025-12-19T10:52:24","modified_gmt":"2025-12-19T02:52:24","slug":"git%e5%90%88%e5%b9%b6","status":"publish","type":"post","link":"https:\/\/niuguodong.com\/index.php\/2023\/06\/03\/git%e5%90%88%e5%b9%b6\/","title":{"rendered":"Git\u5408\u5e76"},"content":{"rendered":"\n<p>\u5408\u5e76<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5408\u5e76\u5206\u652f<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># \u5c06feature\u5206\u652f\u5408\u5e76\u5230\u5f53\u524d\u5206\u652f\ngit merge feature<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5408\u5e76\u7b56\u7565\u4e0e\u6a21\u5f0f<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u5feb\u8fdb\u5408\u5e76<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>git merge --no-ff feature-branch<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u538b\u7f29\u5408\u5e76<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>git merge --squash feature-branch\ngit commit -m \"Squashed feature branch commits\"<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u53d8\u57fa<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># \u5c06\u5f53\u524d\u5206\u652f\u53d8\u57fa\u5230master\u5206\u652f\ngit rebase master<\/code><\/pre>\n\n\n\n<p>\u53d8\u57fa\u539f\u5219\uff1a\u53ea\u53d8\u57fa\u672c\u5730\u6ca1\u6709\u63a8\u9001\u8fc7\u7684\u5206\u652f\uff0c\u7528\u4e8e\u6e05\u7406\u63d0\u4ea4\u5386\u53f2\uff0c\u5bf9\u4e8e\u5df2\u7ecf\u63a8\u9001\u8fc7\u7684\u5206\u652f\uff0c\u4e0d\u8fdb\u884c\u53d8\u57fa\uff0c\u9664\u975e\u8fd9\u4e2a\u8fdc\u7a0b\u4ed3\u5e93\u53ea\u6709\u4e00\u4e2a\u5f00\u53d1\u8005\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u9ad8\u7ea7\u5408\u5e76<\/h2>\n","protected":false},"excerpt":{"rendered":"<p>\u5408\u5e76 \u5408\u5e76\u5206\u652f \u5408\u5e76\u7b56\u7565\u4e0e\u6a21\u5f0f \u5feb\u8fdb\u5408\u5e76 \u538b\u7f29\u5408\u5e76 \u53d8\u57fa \u53d8\u57fa\u539f\u5219\uff1a\u53ea\u53d8\u57fa\u672c\u5730\u6ca1\u6709\u63a8\u9001\u8fc7\u7684\u5206\u652f\uff0c\u7528\u4e8e\u6e05\u7406\u63d0\u4ea4\u5386 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6,5],"tags":[],"class_list":["post-447","post","type-post","status-publish","format-standard","hentry","category-git","category-5"],"_links":{"self":[{"href":"https:\/\/niuguodong.com\/index.php\/wp-json\/wp\/v2\/posts\/447","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/niuguodong.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/niuguodong.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/niuguodong.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/niuguodong.com\/index.php\/wp-json\/wp\/v2\/comments?post=447"}],"version-history":[{"count":0,"href":"https:\/\/niuguodong.com\/index.php\/wp-json\/wp\/v2\/posts\/447\/revisions"}],"wp:attachment":[{"href":"https:\/\/niuguodong.com\/index.php\/wp-json\/wp\/v2\/media?parent=447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/niuguodong.com\/index.php\/wp-json\/wp\/v2\/categories?post=447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/niuguodong.com\/index.php\/wp-json\/wp\/v2\/tags?post=447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}