{"id":107168,"date":"2026-09-19T04:20:35","date_gmt":"2026-09-18T20:20:35","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/107168.html"},"modified":"2026-09-19T04:20:35","modified_gmt":"2026-09-18T20:20:35","slug":"%e3%80%90git%ef%bc%9a%e7%bb%bc%e5%90%88%e5%a4%8d%e7%9b%98%e3%80%91git-%e5%8e%9f%e7%90%86%e4%b8%8e%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/107168.html","title":{"rendered":"\u3010Git\uff1a\u7efc\u5408\u590d\u76d8\u3011Git \u539f\u7406\u4e0e\u4f7f\u7528"},"content":{"rendered":"<p> <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260918202033-6aad9d11a7e92.png\" width=\"200\" height=\"200\" alt=\"\u5934\u50cf\" \/> <\/p>\n<p> <font color=\"#c0392b\">&#x1f3ac; \u4e2a\u4eba\u4e3b\u9875&#xff1a;\u827e\u8389\u4e1d\u52aa\u529b\u7ec3\u5251<\/font><\/p>\n<p> <font color=\"#3498db\">\u2744\u4e13\u680f\u4f20\u9001\u95e8&#xff1a;\u300aC\u8bed\u8a00\u300b\u300a\u6570\u636e\u7ed3\u6784\u4e0e\u7b97\u6cd5\u300b\u300aC\/C&#043;&#043;\u5e72\u8d27\u5206\u4eab&amp;\u5b66\u4e60\u8fc7\u7a0b\u8bb0\u5f55\u300b \u300aLinux\u64cd\u4f5c\u7cfb\u7edf\u7f16\u7a0b\u8be6\u89e3\u300b\u300a\u7b14\u8bd5\/\u9762\u8bd5\u5e38\u89c1\u7b97\u6cd5&#xff1a;\u4ece\u57fa\u7840\u5230\u8fdb\u9636\u300b\u300aPython\u5e72\u8d27\u5206\u4eab\u300b<\/font><\/p>\n<p> <font color=\"7B68EE\" size=\"4\">\u2b50\ufe0f\u4e3a\u5929\u5730\u7acb\u5fc3&#xff0c;\u4e3a\u751f\u6c11\u7acb\u547d&#xff0c;\u4e3a\u5f80\u5723\u7ee7\u7edd\u5b66&#xff0c;\u4e3a\u4e07\u4e16\u5f00\u592a\u5e73 <\/font><\/p>\n<hr \/>\n<p><font color=\"#c0392b\" size=\"4\">&#x1f3ac; \u827e\u8389\u4e1d\u7684\u7b80\u4ecb&#xff1a;<\/font><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260918202033-6aad9d11ce813.gif\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<hr \/>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>1 ~&gt; \u5b66\u4e60\u76ee\u6807<\/li>\n<li>\n<ul>\n<li>1.1 \u6280\u672f\u76ee\u6807<\/li>\n<li>1.2 \u534f\u4f5c\u76ee\u6807<\/li>\n<\/ul>\n<\/li>\n<li>2 ~&gt; Git \u521d\u8bc6<\/li>\n<li>\n<ul>\n<li>2.1 \u7248\u672c\u63a7\u5236\u5668\u7684\u4f5c\u7528<\/li>\n<li>2.2 \u6838\u5fc3\u6ce8\u610f\u4e8b\u9879<\/li>\n<\/ul>\n<\/li>\n<li>3 ~&gt; Git \u5b89\u88c5<\/li>\n<li>\n<ul>\n<li>3.1 Linux-centos \u7cfb\u7edf<\/li>\n<li>3.2 Linux-ubuntu \u7cfb\u7edf<\/li>\n<li>3.3 Windows \u7cfb\u7edf<\/li>\n<\/ul>\n<\/li>\n<li>4 ~&gt; Git \u57fa\u672c\u64cd\u4f5c<\/li>\n<li>\n<ul>\n<li>4.1 \u521b\u5efa\u672c\u5730\u4ed3\u5e93<\/li>\n<li>4.2 \u914d\u7f6e Git<\/li>\n<li>4.3 \u6838\u5fc3\u6982\u5ff5&#xff1a;\u5de5\u4f5c\u533a\u3001\u6682\u5b58\u533a\u3001\u7248\u672c\u5e93<\/li>\n<li>4.4 \u6587\u4ef6\u6dfb\u52a0\u4e0e\u63d0\u4ea4<\/li>\n<li>\n<ul>\n<li>4.4.1 \u6dfb\u52a0\u5230\u6682\u5b58\u533a<\/li>\n<li>4.4.2 \u63d0\u4ea4\u5230\u7248\u672c\u5e93<\/li>\n<\/ul>\n<\/li>\n<li>4.5 \u67e5\u770b\u63d0\u4ea4\u5386\u53f2<\/li>\n<li>4.6 \u4fee\u6539\u6587\u4ef6\u4e0e\u5dee\u5f02\u67e5\u770b<\/li>\n<li>\n<ul>\n<li>4.6.1 \u67e5\u770b\u4ed3\u5e93\u72b6\u6001<\/li>\n<li>\n<ul>\n<li>4.6.2 \u67e5\u770b\u5177\u4f53\u4fee\u6539\u5dee\u5f02<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>4.7 \u7248\u672c\u56de\u9000<\/li>\n<li>\n<ul>\n<li>4.7.1 \u5e38\u7528\u5199\u6cd5<\/li>\n<li>4.7.2 \u64cd\u4f5c\u8bb0\u5f55\u8ffd\u6eaf<\/li>\n<\/ul>\n<\/li>\n<li>4.8 \u64a4\u9500\u4fee\u6539\u7684\u4e09\u79cd\u573a\u666f<\/li>\n<li>\n<ul>\n<li>4.8.1 \u573a\u666f1&#xff1a;\u4fee\u6539\u4ec5\u5728\u5de5\u4f5c\u533a&#xff0c;\u672a add<\/li>\n<li>4.8.2 \u573a\u666f2&#xff1a;\u5df2 add \u5230\u6682\u5b58\u533a&#xff0c;\u672a commit<\/li>\n<li>4.8.3 \u573a\u666f3&#xff1a;\u5df2 commit \u63d0\u4ea4&#xff0c;\u672a\u63a8\u9001\u5230\u8fdc\u7a0b<\/li>\n<\/ul>\n<\/li>\n<li>4.9 \u5220\u9664\u6587\u4ef6<\/li>\n<li>\n<ul>\n<li>4.9.1 \u8bef\u5220\u6062\u590d<\/li>\n<li>4.9.2 \u786e\u8ba4\u5220\u9664\u6587\u4ef6<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>5 ~&gt; \u5206\u652f\u7ba1\u7406<\/li>\n<li>\n<ul>\n<li>5.1 \u5206\u652f\u7684\u6982\u5ff5<\/li>\n<li>5.2 \u5206\u652f\u57fa\u7840\u64cd\u4f5c<\/li>\n<li>5.3 \u5408\u5e76\u51b2\u7a81\u4e0e\u89e3\u51b3<\/li>\n<li>\n<ul>\n<li>5.3.1 \u51b2\u7a81\u73b0\u8c61<\/li>\n<li>5.3.2 \u89e3\u51b3\u6b65\u9aa4<\/li>\n<\/ul>\n<\/li>\n<li>5.4 \u4e24\u79cd\u5408\u5e76\u6a21\u5f0f<\/li>\n<li>\n<ul>\n<li>5.4.1 Fast-forward&#xff08;\u5feb\u8fdb\u6a21\u5f0f&#xff09;<\/li>\n<li>5.4.2 \u666e\u901a\u5408\u5e76&#xff08;\u7981\u7528\u5feb\u8fdb&#xff09;<\/li>\n<\/ul>\n<\/li>\n<li>5.5 \u5de5\u4f5c\u533a\u4e34\u65f6\u50a8\u85cf git stash<\/li>\n<li>5.6 \u5206\u652f\u7ba1\u7406\u6700\u4f73\u5b9e\u8df5<\/li>\n<\/ul>\n<\/li>\n<li>6 ~&gt; \u8fdc\u7a0b\u64cd\u4f5c<\/li>\n<li>\n<ul>\n<li>6.1 \u5206\u5e03\u5f0f\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u539f\u7406<\/li>\n<li>6.2 \u8fdc\u7a0b\u4ed3\u5e93\u51c6\u5907<\/li>\n<li>\n<ul>\n<li>6.2.1 SSH \u516c\u94a5\u914d\u7f6e<\/li>\n<\/ul>\n<\/li>\n<li>6.3 \u514b\u9686\u8fdc\u7a0b\u4ed3\u5e93<\/li>\n<li>\n<ul>\n<li>6.3.1 \u67e5\u770b\u8fdc\u7a0b\u4ed3\u5e93\u4fe1\u606f<\/li>\n<\/ul>\n<\/li>\n<li>6.4 \u63a8\u9001\u4e0e\u62c9\u53d6<\/li>\n<li>\n<ul>\n<li>6.4.1 \u63a8\u9001\u5230\u8fdc\u7a0b<\/li>\n<li>6.4.2 \u62c9\u53d6\u8fdc\u7a0b\u66f4\u65b0<\/li>\n<\/ul>\n<\/li>\n<li>6.5 .gitignore \u5ffd\u7565\u6587\u4ef6<\/li>\n<li>\n<ul>\n<li>6.5.1 \u5e38\u7528\u89c4\u5219<\/li>\n<li>6.5.2 \u76f8\u5173\u547d\u4ee4<\/li>\n<\/ul>\n<\/li>\n<li>6.6 \u547d\u4ee4\u522b\u540d\u914d\u7f6e<\/li>\n<\/ul>\n<\/li>\n<li>7 ~&gt; \u6807\u7b7e\u7ba1\u7406<\/li>\n<li>\n<ul>\n<li>7.1 \u6807\u7b7e\u7684\u4f5c\u7528<\/li>\n<li>7.2 \u6807\u7b7e\u57fa\u7840\u64cd\u4f5c<\/li>\n<\/ul>\n<\/li>\n<li>8 ~&gt; \u591a\u4eba\u534f\u4f5c\u5f00\u53d1<\/li>\n<li>\n<ul>\n<li>8.1 \u5355\u5206\u652f\u534f\u4f5c\u6d41\u7a0b<\/li>\n<li>8.2 \u591a\u5206\u652f&#xff08;Feature&#xff09;\u534f\u4f5c\u6d41\u7a0b<\/li>\n<li>\n<ul>\n<li>8.2.1 \u534f\u4f5c\u6ce8\u610f\u4e8b\u9879<\/li>\n<\/ul>\n<\/li>\n<li>8.3 \u8fdc\u7a0b\u5206\u652f\u6e05\u7406<\/li>\n<\/ul>\n<\/li>\n<li>9 ~&gt; \u4f01\u4e1a\u7ea7\u5f00\u53d1\u6a21\u578b<\/li>\n<li>\n<ul>\n<li>9.1 DevOps \u4e0e\u7cfb\u7edf\u73af\u5883<\/li>\n<li>\n<ul>\n<li>9.1.1 DevOps \u7406\u5ff5<\/li>\n<li>9.1.2 \u7cfb\u7edf\u5f00\u53d1\u73af\u5883<\/li>\n<\/ul>\n<\/li>\n<li>9.2 Git Flow \u5206\u652f\u8bbe\u8ba1\u89c4\u8303<\/li>\n<li>9.3 \u4f01\u4e1a\u7ea7\u9879\u76ee\u5f00\u53d1\u6d41\u7a0b<\/li>\n<li>\n<ul>\n<li>9.3.1 \u65b0\u9700\u6c42\u5f00\u53d1<\/li>\n<li>9.3.2 \u7ebf\u4e0a Bug \u7d27\u6025\u4fee\u590d<\/li>\n<li>9.3.3 \u6d4b\u8bd5\/\u9884\u53d1\u5e03\u73af\u5883 Bug \u4fee\u590d<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\u7ed3\u5c3e<\/li>\n<\/ul>\n<hr \/>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260918202034-6aad9d1236fc2.gif\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<hr \/>\n<h2>1 ~&gt; \u5b66\u4e60\u76ee\u6807<\/h2>\n<h3>1.1 \u6280\u672f\u76ee\u6807<\/h3>\n<ul>\n<li>\u638c\u63e1 Git \u4f01\u4e1a\u7ea7\u5e94\u7528&#xff0c;\u6df1\u523b\u7406\u89e3\u5de5\u4f5c\u533a\u3001\u6682\u5b58\u533a\u3001\u7248\u672c\u5e93\u7684\u542b\u4e49\u4e0e\u64cd\u4f5c\u539f\u7406<\/li>\n<li>\u638c\u63e1 Git \u7248\u672c\u7ba1\u7406&#xff0c;\u53ef\u81ea\u7531\u5b8c\u6210\u7248\u672c\u56de\u9000\u3001\u64a4\u9500\u3001\u4fee\u6539\u7b49\u5168\u6d41\u7a0b\u64cd\u4f5c<\/li>\n<li>\u638c\u63e1 Git \u5206\u652f\u7ba1\u7406&#xff0c;\u8986\u76d6\u5206\u652f\u521b\u5efa\u3001\u5207\u6362\u3001\u5408\u5e76\u3001\u5220\u9664\u5168\u751f\u547d\u5468\u671f&#xff0c;\u9002\u914d\u591a\u573a\u666f\u5206\u652f\u7ba1\u7406<\/li>\n<li>\u638c\u63e1\u672c\u5730\u4ed3\u5e93\u4e0e\u8fdc\u7a0b\u4ed3\u5e93\u7684\u4ea4\u4e92&#xff0c;\u5b9e\u73b0\u57fa\u4e8e\u5206\u652f\u7684\u4e2a\u4eba\u5f00\u53d1\u4e0e\u591a\u4eba\u534f\u4f5c<\/li>\n<li>\u7406\u89e3\u5206\u5e03\u5f0f\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u539f\u7406&#xff0c;\u638c\u63e1\u6807\u51c6\u5316\u591a\u4eba\u534f\u4f5c\u5f00\u53d1\u6a21\u5f0f<\/li>\n<\/ul>\n<h3>1.2 \u534f\u4f5c\u76ee\u6807<\/h3>\n<ul>\n<li>\u638c\u63e1\u4f01\u4e1a\u7ea7\u5e38\u89c1\u5206\u652f\u7b56\u7565&#xff08;master\/release\/develop\/feature\/hotfix&#xff09;<\/li>\n<li>\u7406\u89e3\u4e0d\u540c\u56e2\u961f\u3001\u4e0d\u540c\u73af\u5883\u4e0b\u7684\u5206\u652f\u6a21\u578b&#xff0c;\u7ed3\u5408\u5f00\u53d1\u3001\u6d4b\u8bd5\u3001\u6280\u672f\u7ecf\u7406\u7b49\u89d2\u8272&#xff0c;\u7406\u89e3\u9879\u76ee\u5f00\u53d1\u5168\u6d41\u7a0b<\/li>\n<\/ul>\n<hr \/>\n<h2>2 ~&gt; Git \u521d\u8bc6<\/h2>\n<h3>2.1 \u7248\u672c\u63a7\u5236\u5668\u7684\u4f5c\u7528<\/h3>\n<p>\u7248\u672c\u63a7\u5236\u5668\u662f\u8bb0\u5f55\u6587\u4ef6\u6bcf\u4e00\u6b21\u6539\u52a8\u4e0e\u7248\u672c\u8fed\u4ee3\u7684\u7ba1\u7406\u7cfb\u7edf&#xff0c;\u6838\u5fc3\u89e3\u51b3\u4e24\u7c7b\u95ee\u9898&#xff1a;<\/p>\n<ul>\n<li>\u5355\u6587\u4ef6\u591a\u7248\u672c\u7ba1\u7406&#xff0c;\u907f\u514d\u201c\u62a5\u544a-v1\/\u6700\u7ec8\u7248\/\u7a76\u6781\u7248\u201d\u8fd9\u7c7b\u624b\u52a8\u526f\u672c\u6df7\u4e71<\/li>\n<li>\u652f\u6301\u591a\u4eba\u534f\u540c\u4f5c\u4e1a&#xff0c;\u7edf\u4e00\u7ba1\u7406\u4ee3\u7801\u4fee\u6539&#xff0c;\u8ffd\u6eaf\u53d8\u66f4\u5386\u53f2<\/li>\n<\/ul>\n<p>Git \u662f\u5f53\u524d\u6700\u4e3b\u6d41\u7684\u5206\u5e03\u5f0f\u7248\u672c\u63a7\u5236\u7cfb\u7edf&#xff0c;\u53ef\u7ba1\u7406\u6240\u6709\u683c\u5f0f\u6587\u4ef6&#xff0c;\u6838\u5fc3\u4ef7\u503c\u662f\u7ba1\u7406\u8f6f\u4ef6\u5f00\u53d1\u7684\u6e90\u4ee3\u7801\u3002<\/p>\n<h3>2.2 \u6838\u5fc3\u6ce8\u610f\u4e8b\u9879<\/h3>\n<ul>\n<li>\u6240\u6709\u7248\u672c\u63a7\u5236\u7cfb\u7edf&#xff08;\u5305\u62ec Git&#xff09;\u53ea\u80fd\u8ddf\u8e2a\u6587\u672c\u6587\u4ef6\u7684\u6539\u52a8&#xff08;\u4ee3\u7801\u3001TXT\u3001\u7f51\u9875\u7b49&#xff09;&#xff0c;\u53ef\u4ee5\u7cbe\u786e\u5230\u884c\u7ea7\u4fee\u6539\u3002<\/li>\n<li>\u4e8c\u8fdb\u5236\u6587\u4ef6&#xff08;\u56fe\u7247\u3001\u89c6\u9891\u7b49&#xff09;\u4ec5\u80fd\u88ab\u7248\u672c\u7ba1\u7406&#xff0c;\u65e0\u6cd5\u8ddf\u8e2a\u5177\u4f53\u5185\u5bb9\u53d8\u5316&#xff0c;\u4ec5\u80fd\u8bb0\u5f55\u6587\u4ef6\u5927\u5c0f\u53d8\u52a8\u3002<\/li>\n<\/ul>\n<hr \/>\n<h2>3 ~&gt; Git \u5b89\u88c5<\/h2>\n<p>Git \u662f\u5f00\u6e90\u5de5\u5177&#xff0c;\u652f\u6301 Linux\u3001Unix\u3001Mac\u3001Windows \u5168\u5e73\u53f0\u3002<\/p>\n<h3>3.1 Linux-centos \u7cfb\u7edf<\/h3>\n<p><span class=\"token comment\"># \u5b89\u88c5 Git<\/span><br \/>\n<span class=\"token function\">sudo<\/span> yum <span class=\"token parameter variable\">-y<\/span> <span class=\"token function\">install<\/span> <span class=\"token function\">git<\/span><\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u5b89\u88c5\u7248\u672c<\/span><br \/>\n<span class=\"token function\">git<\/span> <span class=\"token parameter variable\">&#8211;version<\/span><\/p>\n<h3>3.2 Linux-ubuntu \u7cfb\u7edf<\/h3>\n<p><span class=\"token comment\"># \u5b89\u88c5 Git<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">apt-get<\/span> <span class=\"token function\">install<\/span> <span class=\"token function\">git<\/span> <span class=\"token parameter variable\">-y<\/span><\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u5b89\u88c5\u7248\u672c<\/span><br \/>\n<span class=\"token function\">git<\/span> <span class=\"token parameter variable\">&#8211;version<\/span><\/p>\n<h3>3.3 Windows \u7cfb\u7edf<\/h3>\n<p>\u901a\u8fc7\u5b98\u65b9\u5b89\u88c5\u5305\u5b89\u88c5&#xff0c;\u5b89\u88c5\u540e\u5728 Git Bash \u7ec8\u7aef\u4e2d\u6267\u884c\u547d\u4ee4\u3002<\/p>\n<hr \/>\n<h2>4 ~&gt; Git \u57fa\u672c\u64cd\u4f5c<\/h2>\n<h3>4.1 \u521b\u5efa\u672c\u5730\u4ed3\u5e93<\/h3>\n<p>\u4ed3\u5e93&#xff08;Repository&#xff09;\u662f\u8fdb\u884c\u7248\u672c\u63a7\u5236\u7684\u6587\u4ef6\u76ee\u5f55&#xff0c;\u521b\u5efa\u547d\u4ee4\u9700\u5728\u76ee\u6807\u76ee\u5f55\u4e0b\u6267\u884c&#xff1a;<\/p>\n<p><span class=\"token function\">git<\/span> init<\/p>\n<p>\u6267\u884c\u540e\u76ee\u5f55\u4e0b\u4f1a\u751f\u6210\u9690\u85cf\u7684 .git \u6587\u4ef6\u5939&#xff0c;\u8fd9\u662f Git \u7684\u7248\u672c\u5e93\u76ee\u5f55&#xff0c;\u7981\u6b62\u624b\u52a8\u4fee\u6539\u5176\u4e2d\u5185\u5bb9&#xff0c;\u5426\u5219\u4f1a\u7834\u574f\u4ed3\u5e93\u5b8c\u6574\u6027\u3002<\/p>\n<h3>4.2 \u914d\u7f6e Git<\/h3>\n<p>\u5b89\u88c5\u540e\u7b2c\u4e00\u6b65\u5fc5\u987b\u914d\u7f6e\u7528\u6237\u540d\u4e0e\u90ae\u7bb1&#xff0c;\u7528\u4e8e\u6807\u8bc6\u63d0\u4ea4\u8005\u8eab\u4efd&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u5168\u5c40\u914d\u7f6e&#xff08;\u672c\u673a\u6240\u6709\u4ed3\u5e93\u751f\u6548&#xff09;<\/span><br \/>\n<span class=\"token function\">git<\/span> config <span class=\"token parameter variable\">&#8211;global<\/span> user.name <span class=\"token string\">&#034;\u4f60\u7684\u6635\u79f0&#034;<\/span><br \/>\n<span class=\"token function\">git<\/span> config <span class=\"token parameter variable\">&#8211;global<\/span> user.email <span class=\"token string\">&#034;\u4f60\u7684\u90ae\u7bb1&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u6240\u6709\u914d\u7f6e<\/span><br \/>\n<span class=\"token function\">git<\/span> config <span class=\"token parameter variable\">-l<\/span><\/p>\n<p><span class=\"token comment\"># \u5220\u9664\u6307\u5b9a\u5168\u5c40\u914d\u7f6e<\/span><br \/>\n<span class=\"token function\">git<\/span> config <span class=\"token parameter variable\">&#8211;global<\/span> <span class=\"token parameter variable\">&#8211;unset<\/span> user.name<\/p>\n<ul>\n<li>\u4e0d\u52a0 &#8211;global \u5219\u4ec5\u5bf9\u5f53\u524d\u4ed3\u5e93\u751f\u6548&#xff0c;\u9700\u5728\u4ed3\u5e93\u76ee\u5f55\u4e0b\u6267\u884c\u3002<\/li>\n<\/ul>\n<h3>4.3 \u6838\u5fc3\u6982\u5ff5&#xff1a;\u5de5\u4f5c\u533a\u3001\u6682\u5b58\u533a\u3001\u7248\u672c\u5e93<\/h3>\n<table>\n<tr>\u533a\u57df\u82f1\u6587\u540d\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>\u5de5\u4f5c\u533a<\/td>\n<td>Working Directory<\/td>\n<td>\u7535\u8111\u4e0a\u76f4\u63a5\u7f16\u5199\u4ee3\u7801\/\u6587\u4ef6\u7684\u76ee\u5f55&#xff0c;\u5373\u6211\u4eec\u64cd\u4f5c\u7684\u6587\u4ef6\u5939<\/td>\n<\/tr>\n<tr>\n<td>\u6682\u5b58\u533a<\/td>\n<td>Stage \/ Index<\/td>\n<td>\u4e34\u65f6\u5b58\u50a8\u4fee\u6539\u7684\u533a\u57df&#xff0c;\u5bf9\u5e94 .git\/index \u6587\u4ef6<\/td>\n<\/tr>\n<tr>\n<td>\u7248\u672c\u5e93<\/td>\n<td>Repository<\/td>\n<td>\u5373 .git \u9690\u85cf\u76ee\u5f55&#xff0c;\u5b58\u50a8\u6240\u6709\u7248\u672c\u8bb0\u5f55\u3001\u5143\u6570\u636e\u4e0e\u5bf9\u8c61<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4e09\u8005\u6d41\u8f6c\u5173\u7cfb&#xff1a;<\/p>\n<li>git add&#xff1a;\u5de5\u4f5c\u533a\u7684\u4fee\u6539 \u2192 \u6682\u5b58\u533a<\/li>\n<li>git commit&#xff1a;\u6682\u5b58\u533a\u7684\u4fee\u6539 \u2192 \u7248\u672c\u5e93&#xff08;\u5f53\u524d\u5206\u652f&#xff09;<\/li>\n<p>\u8865\u5145&#xff1a; Git \u521d\u59cb\u5316\u4f1a\u81ea\u52a8\u521b\u5efa master \u4e3b\u5206\u652f&#xff0c;\u4ee5\u53ca\u6307\u5411\u5f53\u524d\u5206\u652f\u7684\u6307\u9488 HEAD\u3002<\/p>\n<h3>4.4 \u6587\u4ef6\u6dfb\u52a0\u4e0e\u63d0\u4ea4<\/h3>\n<h4>4.4.1 \u6dfb\u52a0\u5230\u6682\u5b58\u533a<\/h4>\n<p><span class=\"token comment\"># \u6dfb\u52a0\u6307\u5b9a\u6587\u4ef6<\/span><br \/>\n<span class=\"token function\">git<\/span> <span class=\"token function\">add<\/span> \u6587\u4ef6\u540d1 \u6587\u4ef6\u540d2<\/p>\n<p><span class=\"token comment\"># \u6dfb\u52a0\u6307\u5b9a\u76ee\u5f55&#xff08;\u542b\u5b50\u76ee\u5f55&#xff09;<\/span><br \/>\n<span class=\"token function\">git<\/span> <span class=\"token function\">add<\/span> \u76ee\u5f55\u540d<\/p>\n<p><span class=\"token comment\"># \u6dfb\u52a0\u5f53\u524d\u76ee\u5f55\u6240\u6709\u4fee\u6539<\/span><br \/>\n<span class=\"token function\">git<\/span> <span class=\"token function\">add<\/span> <span class=\"token builtin class-name\">.<\/span><\/p>\n<h4>4.4.2 \u63d0\u4ea4\u5230\u7248\u672c\u5e93<\/h4>\n<p><span class=\"token comment\"># \u63d0\u4ea4\u6682\u5b58\u533a\u5168\u90e8\u5185\u5bb9&#xff0c;\u5fc5\u987b\u586b\u5199\u63d0\u4ea4\u8bf4\u660e<\/span><br \/>\n<span class=\"token function\">git<\/span> commit <span class=\"token parameter variable\">-m<\/span> <span class=\"token string\">&#034;\u63d0\u4ea4\u63cf\u8ff0\u4fe1\u606f&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u63d0\u4ea4\u6682\u5b58\u533a\u6307\u5b9a\u6587\u4ef6<\/span><br \/>\n<span class=\"token function\">git<\/span> commit \u6587\u4ef6\u540d <span class=\"token parameter variable\">-m<\/span> <span class=\"token string\">&#034;\u63d0\u4ea4\u63cf\u8ff0&#034;<\/span><\/p>\n<ul>\n<li>\u63d0\u4ea4\u8bf4\u660e\u7528\u4e8e\u8bb0\u5f55\u672c\u6b21\u4fee\u6539\u5185\u5bb9&#xff0c;\u662f\u7248\u672c\u8ffd\u6eaf\u7684\u5173\u952e&#xff0c;\u7981\u6b62\u7701\u7565\u3002<\/li>\n<li>\u53ef\u591a\u6b21 git add \u4e0d\u540c\u6587\u4ef6&#xff0c;\u6700\u540e\u4e00\u6b21 git commit \u4e00\u6b21\u6027\u63d0\u4ea4\u6240\u6709\u6682\u5b58\u4fee\u6539\u3002<\/li>\n<\/ul>\n<h3>4.5 \u67e5\u770b\u63d0\u4ea4\u5386\u53f2<\/h3>\n<p><span class=\"token comment\"># \u5b8c\u6574\u5c55\u793a\u63d0\u4ea4\u8bb0\u5f55<\/span><br \/>\n<span class=\"token function\">git<\/span> log<\/p>\n<p><span class=\"token comment\"># \u7cbe\u7b80\u5355\u884c\u663e\u793a<\/span><br \/>\n<span class=\"token function\">git<\/span> log <span class=\"token parameter variable\">&#8211;pretty<\/span><span class=\"token operator\">&#061;<\/span>oneline<\/p>\n<p><span class=\"token comment\"># \u56fe\u5f62\u5316\u5c55\u793a\u5206\u652f\u5408\u5e76\u5386\u53f2<\/span><br \/>\n<span class=\"token function\">git<\/span> log <span class=\"token parameter variable\">&#8211;graph<\/span> <span class=\"token parameter variable\">&#8211;pretty<\/span><span class=\"token operator\">&#061;<\/span>oneline &#8211;abbrev-commit<\/p>\n<ul>\n<li>\u6bcf\u6b21\u63d0\u4ea4\u7684\u552f\u4e00\u6807\u8bc6\u662f commit id&#xff0c;\u7531 SHA1 \u7b97\u6cd5\u751f\u6210\u7684\u5341\u516d\u8fdb\u5236\u5b57\u7b26\u4e32&#xff0c;\u800c\u975e\u9012\u589e\u6570\u5b57\u3002<\/li>\n<\/ul>\n<h3>4.6 \u4fee\u6539\u6587\u4ef6\u4e0e\u5dee\u5f02\u67e5\u770b<\/h3>\n<h4>4.6.1 \u67e5\u770b\u4ed3\u5e93\u72b6\u6001<\/h4>\n<p><span class=\"token function\">git<\/span> status<\/p>\n<p>\u53ef\u67e5\u770b\u6587\u4ef6\u662f\u5426\u88ab\u4fee\u6539\u3001\u662f\u5426\u6682\u5b58\u3001\u662f\u5426\u63d0\u4ea4&#xff0c;\u4ee5\u53ca\u5f53\u524d\u5206\u652f\u72b6\u6001\u3002<\/p>\n<h5>4.6.2 \u67e5\u770b\u5177\u4f53\u4fee\u6539\u5dee\u5f02<\/h5>\n<p><span class=\"token comment\"># \u67e5\u770b\u5de5\u4f5c\u533a \u4e0e \u6682\u5b58\u533a \u7684\u5dee\u5f02<\/span><br \/>\n<span class=\"token function\">git<\/span> <span class=\"token function\">diff<\/span> \u6587\u4ef6\u540d<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u5de5\u4f5c\u533a \u4e0e \u7248\u672c\u5e93&#xff08;\u6700\u65b0\u63d0\u4ea4&#xff09;\u7684\u5dee\u5f02<\/span><br \/>\n<span class=\"token function\">git<\/span> <span class=\"token function\">diff<\/span> HEAD &#8212; \u6587\u4ef6\u540d<\/p>\n<h3>4.7 \u7248\u672c\u56de\u9000<\/h3>\n<p>\u4f7f\u7528 git reset \u547d\u4ee4\u56de\u9000\u7248\u672c&#xff0c;\u6838\u5fc3\u662f\u79fb\u52a8\u5206\u652f\u6307\u9488&#xff0c;\u4e09\u4e2a\u53c2\u6570\u533a\u522b\u5982\u4e0b&#xff1a;<\/p>\n<table>\n<tr>\u53c2\u6570\u7248\u672c\u5e93\u6682\u5b58\u533a\u5de5\u4f5c\u533a\u9002\u7528\u573a\u666f<\/tr>\n<tbody>\n<tr>\n<td>&#8211;soft<\/td>\n<td>\u56de\u9000<\/td>\n<td>\u4e0d\u53d8<\/td>\n<td>\u4e0d\u53d8<\/td>\n<td>\u4ec5\u64a4\u9500\u63d0\u4ea4&#xff0c;\u4fee\u6539\u4fdd\u7559\u5728\u6682\u5b58\u533a<\/td>\n<\/tr>\n<tr>\n<td>&#8211;mixed&#xff08;\u9ed8\u8ba4&#xff09;<\/td>\n<td>\u56de\u9000<\/td>\n<td>\u56de\u9000<\/td>\n<td>\u4e0d\u53d8<\/td>\n<td>\u64a4\u9500\u63d0\u4ea4\u4e0e\u6682\u5b58&#xff0c;\u4fee\u6539\u4fdd\u7559\u5728\u5de5\u4f5c\u533a<\/td>\n<\/tr>\n<tr>\n<td>&#8211;hard<\/td>\n<td>\u56de\u9000<\/td>\n<td>\u56de\u9000<\/td>\n<td>\u56de\u9000<\/td>\n<td>\u5f7b\u5e95\u56de\u9000&#xff0c;\u5de5\u4f5c\u533a\u6240\u6709\u672a\u63d0\u4ea4\u4fee\u6539\u4f1a\u4e22\u5931<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>4.7.1 \u5e38\u7528\u5199\u6cd5<\/h4>\n<p><span class=\"token comment\"># \u56de\u9000\u5230\u4e0a\u4e00\u4e2a\u7248\u672c<\/span><br \/>\n<span class=\"token function\">git<\/span> reset <span class=\"token parameter variable\">&#8211;hard<\/span> HEAD^<\/p>\n<p><span class=\"token comment\"># \u56de\u9000\u5230\u4e0a\u4e0a\u4e00\u4e2a\u7248\u672c<\/span><br \/>\n<span class=\"token function\">git<\/span> reset <span class=\"token parameter variable\">&#8211;hard<\/span> HEAD^^<\/p>\n<p><span class=\"token comment\"># \u56de\u9000\u5230\u6307\u5b9a commit id \u7248\u672c&#xff08;\u53ef\u5199\u524d\u51e0\u4f4d&#xff09;<\/span><br \/>\n<span class=\"token function\">git<\/span> reset <span class=\"token parameter variable\">&#8211;hard<\/span> commit_id<\/p>\n<h4>4.7.2 \u64cd\u4f5c\u8bb0\u5f55\u8ffd\u6eaf<\/h4>\n<p>\u5982\u679c\u8bef\u56de\u9000\u60f3\u6062\u590d&#xff0c;\u53ef\u901a\u8fc7 git reflog \u67e5\u770b\u6240\u6709\u64cd\u4f5c\u8bb0\u5f55&#xff08;\u5305\u62ec\u56de\u9000\u3001\u63d0\u4ea4\u7b49&#xff09;&#xff0c;\u627e\u5230\u76ee\u6807 commit id \u518d\u56de\u9000&#xff1a;<\/p>\n<p><span class=\"token function\">git<\/span> reflog<\/p>\n<h3>4.8 \u64a4\u9500\u4fee\u6539\u7684\u4e09\u79cd\u573a\u666f<\/h3>\n<h4>4.8.1 \u573a\u666f1&#xff1a;\u4fee\u6539\u4ec5\u5728\u5de5\u4f5c\u533a&#xff0c;\u672a add<\/h4>\n<p><span class=\"token comment\"># \u6062\u590d\u6587\u4ef6\u5230\u6700\u8fd1\u4e00\u6b21 add\/commit \u7684\u72b6\u6001<\/span><br \/>\n<span class=\"token function\">git<\/span> checkout &#8212; \u6587\u4ef6\u540d<\/p>\n<p>\u6ce8\u610f&#xff1a; &#8212; \u4e0d\u80fd\u7701\u7565&#xff0c;\u5426\u5219\u547d\u4ee4\u542b\u4e49\u53d8\u4e3a\u5207\u6362\u5206\u652f\u3002<\/p>\n<h4>4.8.2 \u573a\u666f2&#xff1a;\u5df2 add \u5230\u6682\u5b58\u533a&#xff0c;\u672a commit<\/h4>\n<p><span class=\"token comment\"># \u5148\u64a4\u9500\u6682\u5b58&#xff0c;\u56de\u5230\u5de5\u4f5c\u533a\u4fee\u6539\u72b6\u6001<\/span><br \/>\n<span class=\"token function\">git<\/span> reset HEAD \u6587\u4ef6\u540d<br \/>\n<span class=\"token comment\"># \u518d\u64a4\u9500\u5de5\u4f5c\u533a\u4fee\u6539<\/span><br \/>\n<span class=\"token function\">git<\/span> checkout &#8212; \u6587\u4ef6\u540d<\/p>\n<h4>4.8.3 \u573a\u666f3&#xff1a;\u5df2 commit \u63d0\u4ea4&#xff0c;\u672a\u63a8\u9001\u5230\u8fdc\u7a0b<\/h4>\n<p>\u4f7f\u7528 git reset &#8211;hard HEAD^ \u56de\u9000\u5230\u4e0a\u4e00\u4e2a\u7248\u672c\u5373\u53ef\u3002<\/p>\n<p>\u82e5\u5df2\u63a8\u9001\u5230\u8fdc\u7a0b\u4ed3\u5e93&#xff0c;\u65e0\u6cd5\u4ec5\u901a\u8fc7\u672c\u5730\u64cd\u4f5c\u64a4\u9500\u8fdc\u7a0b\u8bb0\u5f55\u3002<\/p>\n<h3>4.9 \u5220\u9664\u6587\u4ef6<\/h3>\n<h4>4.9.1 \u8bef\u5220\u6062\u590d<\/h4>\n<p>\u5982\u679c\u624b\u52a8\u5220\u9664\u4e86\u5de5\u4f5c\u533a\u6587\u4ef6&#xff0c;\u53ef\u4ece\u7248\u672c\u5e93\u6062\u590d&#xff1a;<\/p>\n<p><span class=\"token function\">git<\/span> checkout &#8212; \u6587\u4ef6\u540d<\/p>\n<h4>4.9.2 \u786e\u8ba4\u5220\u9664\u6587\u4ef6<\/h4>\n<p>\u4ece\u7248\u672c\u5e93\u4e2d\u5220\u9664\u6587\u4ef6\u9700\u6267\u884c&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u4ece\u5de5\u4f5c\u533a\u548c\u6682\u5b58\u533a\u540c\u65f6\u5220\u9664<\/span><br \/>\n<span class=\"token function\">git<\/span> <span class=\"token function\">rm<\/span> \u6587\u4ef6\u540d<br \/>\n<span class=\"token comment\"># \u63d0\u4ea4\u5220\u9664\u64cd\u4f5c<\/span><br \/>\n<span class=\"token function\">git<\/span> commit <span class=\"token parameter variable\">-m<\/span> <span class=\"token string\">&#034;\u5220\u9664\u6587\u4ef6\u8bf4\u660e&#034;<\/span><\/p>\n<hr \/>\n<h2>5 ~&gt; \u5206\u652f\u7ba1\u7406<\/h2>\n<h3>5.1 \u5206\u652f\u7684\u6982\u5ff5<\/h3>\n<p>\u5206\u652f\u53ef\u4ee5\u7406\u89e3\u4e3a\u201c\u5e73\u884c\u65f6\u95f4\u7ebf\u201d&#xff0c;\u4e0d\u540c\u5206\u652f\u4e0a\u7684\u5f00\u53d1\u4e92\u4e0d\u5e72\u6270&#xff0c;\u529f\u80fd\u5b8c\u6210\u540e\u518d\u5408\u5e76\u3002<\/p>\n<ul>\n<li>master&#xff1a;\u4e3b\u5206\u652f&#xff0c;\u9ed8\u8ba4\u521b\u5efa&#xff0c;\u662f\u7a33\u5b9a\u7684\u4ee3\u7801\u4e3b\u7ebf<\/li>\n<li>HEAD&#xff1a;\u6307\u9488&#xff0c;\u6307\u5411\u5f53\u524d\u6240\u5728\u7684\u5206\u652f<\/li>\n<li>\u5206\u652f\u672c\u8d28\u662f\u4e00\u4e2a\u6307\u5411 commit \u7684\u6307\u9488&#xff0c;\u521b\u5efa\u3001\u5207\u6362\u3001\u5220\u9664\u90fd\u6781\u5feb&#xff0c;\u56e0\u4e3a\u53ea\u662f\u6307\u9488\u53d8\u52a8\u3002<\/li>\n<\/ul>\n<h3>5.2 \u5206\u652f\u57fa\u7840\u64cd\u4f5c<\/h3>\n<p><span class=\"token comment\"># \u67e5\u770b\u6240\u6709\u672c\u5730\u5206\u652f<\/span><br \/>\n<span class=\"token function\">git<\/span> branch<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u5206\u652f<\/span><br \/>\n<span class=\"token function\">git<\/span> branch \u5206\u652f\u540d<\/p>\n<p><span class=\"token comment\"># \u5207\u6362\u5206\u652f<\/span><br \/>\n<span class=\"token function\">git<\/span> checkout \u5206\u652f\u540d<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u5e76\u5207\u6362\u5206\u652f&#xff08;\u4e00\u6b65\u5b8c\u6210&#xff09;<\/span><br \/>\n<span class=\"token function\">git<\/span> checkout <span class=\"token parameter variable\">-b<\/span> \u5206\u652f\u540d<\/p>\n<p><span class=\"token comment\"># \u5408\u5e76\u6307\u5b9a\u5206\u652f\u5230\u5f53\u524d\u5206\u652f<\/span><br \/>\n<span class=\"token function\">git<\/span> merge \u5206\u652f\u540d<\/p>\n<p><span class=\"token comment\"># \u5220\u9664\u5df2\u5408\u5e76\u7684\u5206\u652f<\/span><br \/>\n<span class=\"token function\">git<\/span> branch <span class=\"token parameter variable\">-d<\/span> \u5206\u652f\u540d<\/p>\n<p><span class=\"token comment\"># \u5f3a\u5236\u5220\u9664\u672a\u5408\u5e76\u7684\u5206\u652f<\/span><br \/>\n<span class=\"token function\">git<\/span> branch <span class=\"token parameter variable\">-D<\/span> \u5206\u652f\u540d<\/p>\n<p>\u6ce8\u610f&#xff1a; \u4e0d\u80fd\u5220\u9664\u5f53\u524d\u6240\u5728\u7684\u5206\u652f&#xff0c;\u9700\u5207\u6362\u5230\u5176\u4ed6\u5206\u652f\u518d\u5220\u9664\u3002<\/p>\n<h3>5.3 \u5408\u5e76\u51b2\u7a81\u4e0e\u89e3\u51b3<\/h3>\n<p>\u5f53\u4e24\u4e2a\u5206\u652f\u5bf9\u540c\u4e00\u6587\u4ef6\u7684\u540c\u4e00\u4f4d\u7f6e\u505a\u4e86\u4e0d\u540c\u4fee\u6539&#xff0c;\u5408\u5e76\u65f6\u4f1a\u4ea7\u751f\u51b2\u7a81&#xff0c;Git \u65e0\u6cd5\u81ea\u52a8\u5408\u5e76&#xff0c;\u9700\u624b\u52a8\u5904\u7406\u3002<\/p>\n<h4>5.3.1 \u51b2\u7a81\u73b0\u8c61<\/h4>\n<p>\u5408\u5e76\u5931\u8d25\u540e&#xff0c;\u51b2\u7a81\u6587\u4ef6\u4f1a\u88ab\u7279\u6b8a\u6807\u8bb0&#xff1a;<\/p>\n<p><span class=\"token operator\">&lt;&lt;&lt;<\/span><span class=\"token operator\">&lt;&lt;&lt;<\/span><span class=\"token operator\">&lt;<\/span> HEAD<br \/>\n\u5f53\u524d\u5206\u652f\u7684\u5185\u5bb9<br \/>\n<span class=\"token operator\">&#061;&#061;<\/span><span class=\"token operator\">&#061;&#061;<\/span><span class=\"token operator\">&#061;&#061;<\/span><span class=\"token operator\">&#061;<\/span><br \/>\n\u5f85\u5408\u5e76\u5206\u652f\u7684\u5185\u5bb9<br \/>\n<span class=\"token operator\">&gt;&gt;<\/span><span class=\"token operator\">&gt;&gt;<\/span><span class=\"token operator\">&gt;&gt;<\/span><span class=\"token operator\">&gt;<\/span> \u5206\u652f\u540d<\/p>\n<h4>5.3.2 \u89e3\u51b3\u6b65\u9aa4<\/h4>\n<li>\u624b\u52a8\u7f16\u8f91\u6587\u4ef6&#xff0c;\u4fdd\u7559\u6b63\u786e\u5185\u5bb9&#xff0c;\u5220\u9664 &lt;&lt;&lt;&lt;&lt;&lt;&lt; &#061;&#061;&#061;&#061;&#061;&#061;&#061; &gt;&gt;&gt;&gt;&gt;&gt;&gt; \u6807\u8bb0<\/li>\n<li>git add \u6587\u4ef6\u540d \u6807\u8bb0\u51b2\u7a81\u5df2\u89e3\u51b3<\/li>\n<li>git commit -m &#034;\u5408\u5e76\u8bf4\u660e&#034; \u63d0\u4ea4\u5408\u5e76\u7ed3\u679c<\/li>\n<h3>5.4 \u4e24\u79cd\u5408\u5e76\u6a21\u5f0f<\/h3>\n<h4>5.4.1 Fast-forward&#xff08;\u5feb\u8fdb\u6a21\u5f0f&#xff09;<\/h4>\n<p>\u5f53\u5f85\u5408\u5e76\u5206\u652f\u662f\u5f53\u524d\u5206\u652f\u7684\u76f4\u63a5\u540e\u7ee7\u65f6&#xff0c;Git \u76f4\u63a5\u79fb\u52a8\u5f53\u524d\u5206\u652f\u6307\u9488&#xff0c;\u4e0d\u751f\u6210\u65b0\u7684 commit\u3002<\/p>\n<ul>\n<li>\u4f18\u70b9&#xff1a;\u901f\u5ea6\u5feb<\/li>\n<li>\u7f3a\u70b9&#xff1a;\u5220\u9664\u5206\u652f\u540e&#xff0c;\u5206\u652f\u5386\u53f2\u4f1a\u4e22\u5931&#xff0c;\u770b\u4e0d\u51fa\u66fe\u7ecf\u5408\u5e76\u8fc7<\/li>\n<\/ul>\n<h4>5.4.2 \u666e\u901a\u5408\u5e76&#xff08;\u7981\u7528\u5feb\u8fdb&#xff09;<\/h4>\n<p><span class=\"token function\">git<\/span> merge &#8211;no-ff <span class=\"token parameter variable\">-m<\/span> <span class=\"token string\">&#034;\u5408\u5e76\u8bf4\u660e&#034;<\/span> \u5206\u652f\u540d<\/p>\n<ul>\n<li>\u5f3a\u5236\u751f\u6210\u4e00\u4e2a\u65b0\u7684\u5408\u5e76 commit<\/li>\n<li>\u4f18\u70b9&#xff1a;\u5206\u652f\u5386\u53f2\u5b8c\u6574&#xff0c;\u53ef\u8ffd\u6eaf\u5408\u5e76\u8bb0\u5f55<\/li>\n<li>\u4f01\u4e1a\u5f00\u53d1\u4e2d\u63a8\u8350\u4f7f\u7528&#xff0c;\u4fdd\u7559\u5206\u652f\u6f14\u5316\u8f68\u8ff9<\/li>\n<\/ul>\n<h3>5.5 \u5de5\u4f5c\u533a\u4e34\u65f6\u50a8\u85cf git stash<\/h3>\n<p>\u5f00\u53d1\u5230\u4e00\u534a\u9700\u8981\u5207\u6362\u5206\u652f\u5904\u7406\u5176\u4ed6\u4efb\u52a1\u65f6&#xff0c;\u53ef\u5c06\u672a\u63d0\u4ea4\u7684\u5de5\u4f5c\u73b0\u573a\u50a8\u85cf\u8d77\u6765&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u50a8\u85cf\u5f53\u524d\u5de5\u4f5c\u533a\u4e0e\u6682\u5b58\u533a<\/span><br \/>\n<span class=\"token function\">git<\/span> stash<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u50a8\u85cf\u5217\u8868<\/span><br \/>\n<span class=\"token function\">git<\/span> stash list<\/p>\n<p><span class=\"token comment\"># \u6062\u590d\u6700\u8fd1\u4e00\u6b21\u50a8\u85cf&#xff0c;\u5e76\u5220\u9664\u50a8\u85cf\u8bb0\u5f55<\/span><br \/>\n<span class=\"token function\">git<\/span> stash pop<\/p>\n<p><span class=\"token comment\"># \u6062\u590d\u6307\u5b9a\u50a8\u85cf&#xff0c;\u4e0d\u5220\u9664\u8bb0\u5f55<\/span><br \/>\n<span class=\"token function\">git<\/span> stash apply stash&#064;<span class=\"token punctuation\">{<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token comment\"># \u5220\u9664\u6307\u5b9a\u50a8\u85cf<\/span><br \/>\n<span class=\"token function\">git<\/span> stash drop stash&#064;<span class=\"token punctuation\">{<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">}<\/span><\/p>\n<h3>5.6 \u5206\u652f\u7ba1\u7406\u6700\u4f73\u5b9e\u8df5<\/h3>\n<li>master \u5206\u652f\u4fdd\u6301\u7a33\u5b9a&#xff0c;\u4ec5\u7528\u4e8e\u53d1\u5e03\u7248\u672c&#xff0c;\u4e0d\u76f4\u63a5\u5728\u4e0a\u9762\u5f00\u53d1<\/li>\n<li>\u65e5\u5e38\u5f00\u53d1\u5728 develop \u5206\u652f\u8fdb\u884c&#xff0c;\u7248\u672c\u53d1\u5e03\u65f6\u518d\u5408\u5e76\u5230 master<\/li>\n<li>\u6bcf\u4e2a\u65b0\u529f\u80fd\u5efa\u4e00\u4e2a feature \u5206\u652f&#xff0c;\u5f00\u53d1\u5b8c\u5408\u5e76\u56de develop&#xff0c;\u7528\u5b8c\u5220\u9664<\/li>\n<li>\u7ebf\u4e0a\u7d27\u6025 bug \u5efa hotfix \u5206\u652f&#xff0c;\u57fa\u4e8e master \u521b\u5efa&#xff0c;\u4fee\u590d\u540e\u5408\u5e76\u56de master \u548c develop<\/li>\n<li>\u5408\u5e76\u5206\u652f\u65f6&#xff0c;\u5148\u5728\u81ea\u5df1\u7684\u5206\u652f\u5408\u5e76 master\/develop&#xff0c;\u89e3\u51b3\u51b2\u7a81\u540e\u518d\u5408\u5e76\u5230\u4e3b\u5206\u652f&#xff0c;\u907f\u514d\u6c61\u67d3\u4e3b\u5206\u652f<\/li>\n<hr \/>\n<h2>6 ~&gt; \u8fdc\u7a0b\u64cd\u4f5c<\/h2>\n<h3>6.1 \u5206\u5e03\u5f0f\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u539f\u7406<\/h3>\n<ul>\n<li>\u6bcf\u4e2a\u4eba\u7684\u7535\u8111\u4e0a\u90fd\u6709\u5b8c\u6574\u7684\u7248\u672c\u5e93&#xff0c;\u5f00\u53d1\u65e0\u9700\u8054\u7f51<\/li>\n<li>\u901a\u8fc7\u201c\u4e2d\u592e\u670d\u52a1\u5668\u201d&#xff08;\u5982 Gitee\u3001GitHub&#xff09;\u4ea4\u6362\u4fee\u6539&#xff0c;\u670d\u52a1\u5668\u4ec5\u8d77\u4e2d\u8f6c\u4f5c\u7528<\/li>\n<li>\u4efb\u610f\u4e00\u53f0\u7535\u8111\u635f\u574f&#xff0c;\u90fd\u53ef\u4ece\u5176\u4ed6\u673a\u5668\u590d\u5236\u5b8c\u6574\u7248\u672c\u5e93&#xff0c;\u5b89\u5168\u6027\u9ad8<\/li>\n<\/ul>\n<h3>6.2 \u8fdc\u7a0b\u4ed3\u5e93\u51c6\u5907<\/h3>\n<p>\u4ee5 Gitee&#xff08;\u7801\u4e91&#xff09;\u4e3a\u4f8b&#xff0c;\u6ce8\u518c\u8d26\u53f7\u540e\u53ef\u521b\u5efa\u514d\u8d39\u8fdc\u7a0b\u4ed3\u5e93\u3002<\/p>\n<ul>\n<li>\u4e24\u79cd\u4f20\u8f93\u534f\u8bae&#xff1a;\n<ul>\n<li>HTTPS&#xff1a;\u65e0\u9700\u914d\u7f6e&#xff0c;\u6bcf\u6b21\u63a8\u9001\u9700\u8f93\u5165\u8d26\u53f7\u5bc6\u7801<\/li>\n<li>SSH&#xff1a;\u9700\u914d\u7f6e SSH \u516c\u94a5&#xff0c;\u914d\u7f6e\u540e\u514d\u5bc6\u63a8\u9001&#xff0c;\u63a8\u8350\u4f7f\u7528<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>6.2.1 SSH \u516c\u94a5\u914d\u7f6e<\/h4>\n<li>\u751f\u6210\u5bc6\u94a5\u5bf9&#xff1a;<\/li>\n<p>ssh-keygen <span class=\"token parameter variable\">-t<\/span> rsa <span class=\"token parameter variable\">-C<\/span> <span class=\"token string\">&#034;\u4f60\u7684\u90ae\u7bb1&#034;<\/span><\/p>\n<p>\u4e00\u8def\u56de\u8f66&#xff0c;\u751f\u6210 ~\/.ssh\/id_rsa&#xff08;\u79c1\u94a5&#xff0c;\u4e0d\u53ef\u6cc4\u9732&#xff09;\u548c ~\/.ssh\/id_rsa.pub&#xff08;\u516c\u94a5&#xff09;\u3002<\/p>\n<li>\u5c06\u516c\u94a5\u5185\u5bb9\u6dfb\u52a0\u5230 Gitee \u8d26\u53f7\u7684 SSH \u516c\u94a5\u8bbe\u7f6e\u4e2d\u3002<\/li>\n<h3>6.3 \u514b\u9686\u8fdc\u7a0b\u4ed3\u5e93<\/h3>\n<p><span class=\"token comment\"># HTTPS \u65b9\u5f0f<\/span><br \/>\n<span class=\"token function\">git<\/span> clone shturl.cc\/m5iULlrG\u7528\u6237\u540d\/\u4ed3\u5e93\u540d.git<\/p>\n<p><span class=\"token comment\"># SSH \u65b9\u5f0f<\/span><br \/>\n<span class=\"token function\">git<\/span> clone git&#064;shturl.cc:\u7528\u6237\u540d\/\u4ed3\u5e93\u540d.git<\/p>\n<ul>\n<li>\u514b\u9686\u540e\u672c\u5730\u4f1a\u81ea\u52a8\u5173\u8054\u8fdc\u7a0b\u4ed3\u5e93&#xff0c;\u9ed8\u8ba4\u8fdc\u7a0b\u4ed3\u5e93\u540d\u4e3a origin<\/li>\n<li>\u672c\u5730 master \u5206\u652f\u81ea\u52a8\u5bf9\u5e94\u8fdc\u7a0b origin\/master \u5206\u652f<\/li>\n<\/ul>\n<h4>6.3.1 \u67e5\u770b\u8fdc\u7a0b\u4ed3\u5e93\u4fe1\u606f<\/h4>\n<p><span class=\"token comment\"># \u67e5\u770b\u8fdc\u7a0b\u4ed3\u5e93\u540d<\/span><br \/>\n<span class=\"token function\">git<\/span> remote<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u8be6\u7ec6\u5730\u5740<\/span><br \/>\n<span class=\"token function\">git<\/span> remote <span class=\"token parameter variable\">-v<\/span><\/p>\n<h3>6.4 \u63a8\u9001\u4e0e\u62c9\u53d6<\/h3>\n<h4>6.4.1 \u63a8\u9001\u5230\u8fdc\u7a0b<\/h4>\n<p><span class=\"token comment\"># \u5c06\u672c\u5730\u5206\u652f\u63a8\u9001\u5230\u8fdc\u7a0b\u540c\u540d\u5206\u652f<\/span><br \/>\n<span class=\"token function\">git<\/span> push origin \u672c\u5730\u5206\u652f\u540d<\/p>\n<p><span class=\"token comment\"># \u5b8c\u6574\u683c\u5f0f&#xff1a;\u672c\u5730\u5206\u652f\u6620\u5c04\u5230\u8fdc\u7a0b\u5206\u652f<\/span><br \/>\n<span class=\"token function\">git<\/span> push origin \u672c\u5730\u5206\u652f\u540d:\u8fdc\u7a0b\u5206\u652f\u540d<\/p>\n<h4>6.4.2 \u62c9\u53d6\u8fdc\u7a0b\u66f4\u65b0<\/h4>\n<p><span class=\"token comment\"># \u62c9\u53d6\u8fdc\u7a0b\u5206\u652f\u5e76\u5408\u5e76\u5230\u5f53\u524d\u672c\u5730\u5206\u652f<\/span><br \/>\n<span class=\"token function\">git<\/span> pull origin \u8fdc\u7a0b\u5206\u652f\u540d<\/p>\n<ul>\n<li>\u63a8\u9001\u5931\u8d25\u65f6&#xff0c;\u901a\u5e38\u662f\u8fdc\u7a0b\u7248\u672c\u6bd4\u672c\u5730\u65b0&#xff0c;\u9700\u5148 git pull \u5408\u5e76\u8fdc\u7a0b\u4fee\u6539&#xff0c;\u89e3\u51b3\u51b2\u7a81\u540e\u518d\u63a8\u9001\u3002<\/li>\n<\/ul>\n<h3>6.5 .gitignore \u5ffd\u7565\u6587\u4ef6<\/h3>\n<p>\u5728\u4ed3\u5e93\u6839\u76ee\u5f55\u521b\u5efa .gitignore \u6587\u4ef6&#xff0c;\u5199\u5165\u89c4\u5219\u53ef\u8ba9 Git \u81ea\u52a8\u5ffd\u7565\u6307\u5b9a\u6587\u4ef6\/\u76ee\u5f55\u3002<\/p>\n<h4>6.5.1 \u5e38\u7528\u89c4\u5219<\/h4>\n<p><span class=\"token comment\"># \u5ffd\u7565\u6240\u6709 .ini \u540e\u7f00\u6587\u4ef6<\/span><br \/>\n*.ini<br \/>\n<span class=\"token comment\"># \u5ffd\u7565\u6240\u6709 .so \u540e\u7f00\u6587\u4ef6<\/span><br \/>\n*.so<\/p>\n<p><span class=\"token comment\"># \u5ffd\u7565\u6240\u6709 .\u5f00\u5934\u7684\u9690\u85cf\u6587\u4ef6<\/span><br \/>\n.*<br \/>\n<span class=\"token comment\"># \u4f46\u4e0d\u5ffd\u7565 .gitignore \u6587\u4ef6<\/span><br \/>\n<span class=\"token operator\">!<\/span>.gitignore<\/p>\n<h4>6.5.2 \u76f8\u5173\u547d\u4ee4<\/h4>\n<p><span class=\"token comment\"># \u5f3a\u5236\u6dfb\u52a0\u88ab\u5ffd\u7565\u7684\u6587\u4ef6<\/span><br \/>\n<span class=\"token function\">git<\/span> <span class=\"token function\">add<\/span> <span class=\"token parameter variable\">-f<\/span> \u6587\u4ef6\u540d<\/p>\n<p><span class=\"token comment\"># \u68c0\u67e5\u54ea\u4e2a\u89c4\u5219\u5ffd\u7565\u4e86\u6587\u4ef6<\/span><br \/>\n<span class=\"token function\">git<\/span> check-ignore <span class=\"token parameter variable\">-v<\/span> \u6587\u4ef6\u540d<\/p>\n<h3>6.6 \u547d\u4ee4\u522b\u540d\u914d\u7f6e<\/h3>\n<p>\u7b80\u5316\u957f\u547d\u4ee4&#xff0c;\u63d0\u5347\u64cd\u4f5c\u6548\u7387&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u793a\u4f8b&#xff1a;git st \u4ee3\u66ff git status<\/span><br \/>\n<span class=\"token function\">git<\/span> config <span class=\"token parameter variable\">&#8211;global<\/span> alias.st status<\/p>\n<p><span class=\"token comment\"># \u793a\u4f8b&#xff1a;git last \u67e5\u770b\u6700\u8fd1\u4e00\u6b21\u63d0\u4ea4<\/span><br \/>\n<span class=\"token function\">git<\/span> config <span class=\"token parameter variable\">&#8211;global<\/span> alias.last <span class=\"token string\">&#039;log -1&#039;<\/span><\/p>\n<hr \/>\n<h2>7 ~&gt; \u6807\u7b7e\u7ba1\u7406<\/h2>\n<h3>7.1 \u6807\u7b7e\u7684\u4f5c\u7528<\/h3>\n<p>\u6807\u7b7e&#xff08;Tag&#xff09;\u662f\u5bf9\u67d0\u6b21\u63d0\u4ea4\u7684\u547d\u540d\u6807\u8bc6&#xff0c;\u76f8\u5f53\u4e8e\u7248\u672c\u522b\u540d&#xff0c;\u7528\u4e8e\u91cc\u7a0b\u7891\u7248\u672c\u6807\u8bb0&#xff08;\u5982 v1.0&#xff09;\u3002<\/p>\n<ul>\n<li>\u76f8\u6bd4\u96be\u8bb0\u7684 commit id&#xff0c;\u6807\u7b7e\u540d\u76f4\u89c2\u6613\u8bb0&#xff0c;\u65b9\u4fbf\u7248\u672c\u5b9a\u4f4d\u4e0e\u56de\u9000\u3002<\/li>\n<\/ul>\n<h3>7.2 \u6807\u7b7e\u57fa\u7840\u64cd\u4f5c<\/h3>\n<p><span class=\"token comment\"># \u67e5\u770b\u6240\u6709\u6807\u7b7e<\/span><br \/>\n<span class=\"token function\">git<\/span> tag<\/p>\n<p><span class=\"token comment\"># \u5728\u6700\u65b0\u63d0\u4ea4\u6253\u6807\u7b7e<\/span><br \/>\n<span class=\"token function\">git<\/span> tag v1.0<\/p>\n<p><span class=\"token comment\"># \u5728\u6307\u5b9a commit \u6253\u6807\u7b7e<\/span><br \/>\n<span class=\"token function\">git<\/span> tag v0.9 commit_id<\/p>\n<p><span class=\"token comment\"># \u521b\u5efa\u5e26\u8bf4\u660e\u7684\u6807\u7b7e<\/span><br \/>\n<span class=\"token function\">git<\/span> tag <span class=\"token parameter variable\">-a<\/span> v1.0 <span class=\"token parameter variable\">-m<\/span> <span class=\"token string\">&#034;\u7248\u672c\u8bf4\u660e&#034;<\/span> commit_id<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u6807\u7b7e\u5bf9\u5e94\u63d0\u4ea4\u4fe1\u606f<\/span><br \/>\n<span class=\"token function\">git<\/span> show v1.0<\/p>\n<p><span class=\"token comment\"># \u5220\u9664\u672c\u5730\u6807\u7b7e<\/span><br \/>\n<span class=\"token function\">git<\/span> tag <span class=\"token parameter variable\">-d<\/span> v1.0<\/p>\n<p><span class=\"token comment\"># \u63a8\u9001\u5355\u4e2a\u6807\u7b7e\u5230\u8fdc\u7a0b<\/span><br \/>\n<span class=\"token function\">git<\/span> push origin v1.0<\/p>\n<p><span class=\"token comment\"># \u63a8\u9001\u6240\u6709\u6807\u7b7e\u5230\u8fdc\u7a0b<\/span><br \/>\n<span class=\"token function\">git<\/span> push origin <span class=\"token parameter variable\">&#8211;tags<\/span><\/p>\n<p><span class=\"token comment\"># \u5220\u9664\u8fdc\u7a0b\u6807\u7b7e<\/span><br \/>\n<span class=\"token function\">git<\/span> push origin :refs\/tags\/v1.0<\/p>\n<ul>\n<li>\u6807\u7b7e\u9ed8\u8ba4\u4ec5\u5b58\u5728\u672c\u5730&#xff0c;\u4e0d\u4f1a\u81ea\u52a8\u63a8\u9001\u5230\u8fdc\u7a0b\u3002<\/li>\n<\/ul>\n<hr \/>\n<h2>8 ~&gt; \u591a\u4eba\u534f\u4f5c\u5f00\u53d1<\/h2>\n<h3>8.1 \u5355\u5206\u652f\u534f\u4f5c\u6d41\u7a0b<\/h3>\n<p>\u540c\u4e00\u5206\u652f&#xff08;\u5982 dev&#xff09;\u591a\u4eba\u534f\u4f5c\u7684\u6807\u51c6\u6d41\u7a0b&#xff1a;<\/p>\n<li>\u7f16\u5199\u4ee3\u7801&#xff0c;\u672c\u5730 commit<\/li>\n<li>git push origin \u5206\u652f\u540d \u5c1d\u8bd5\u63a8\u9001<\/li>\n<li>\u82e5\u63a8\u9001\u5931\u8d25&#xff0c;\u8bf4\u660e\u8fdc\u7a0b\u6709\u66f4\u65b0&#xff0c;\u6267\u884c git pull origin \u5206\u652f\u540d<\/li>\n<li>\u82e5\u5408\u5e76\u6709\u51b2\u7a81&#xff0c;\u624b\u52a8\u89e3\u51b3\u51b2\u7a81\u5e76 commit<\/li>\n<li>\u518d\u6b21 git push origin \u5206\u652f\u540d \u63a8\u9001\u6210\u529f<\/li>\n<h3>8.2 \u591a\u5206\u652f&#xff08;Feature&#xff09;\u534f\u4f5c\u6d41\u7a0b<\/h3>\n<p>\u4f01\u4e1a\u4e2d\u6bcf\u4e2a\u9700\u6c42\u5bf9\u5e94\u4e00\u4e2a feature \u5206\u652f&#xff0c;\u4e92\u4e0d\u5e72\u6270&#xff1a;<\/p>\n<li>\u5f00\u53d1\u8005\u57fa\u4e8e develop \u521b\u5efa feature\/xxx \u5206\u652f&#xff0c;\u672c\u5730\u5f00\u53d1<\/li>\n<li>\u5f00\u53d1\u5b8c\u6210\u540e\u63a8\u9001\u5230\u8fdc\u7a0b\u540c\u540d\u5206\u652f<\/li>\n<li>\u53d1\u8d77\u4ee3\u7801\u8bc4\u5ba1&#xff08;Pull Request&#xff09;&#xff0c;\u8bc4\u5ba1\u901a\u8fc7\u540e\u5408\u5e76\u5230 develop<\/li>\n<li>\u529f\u80fd\u4e0a\u7ebf\u540e\u5220\u9664 feature \u5206\u652f<\/li>\n<h4>8.2.1 \u534f\u4f5c\u6ce8\u610f\u4e8b\u9879<\/h4>\n<ul>\n<li>\u63a5\u624b\u4ed6\u4eba\u5206\u652f\u65f6&#xff0c;\u5148 git pull \u62c9\u53d6\u8fdc\u7a0b\u6700\u65b0\u5185\u5bb9<\/li>\n<li>\u672c\u5730\u5206\u652f\u9700\u4e0e\u8fdc\u7a0b\u5206\u652f\u5efa\u7acb\u8ffd\u8e2a\u5173\u7cfb&#xff0c;\u624d\u80fd\u76f4\u63a5 git pull\/push<\/li>\n<\/ul>\n<p><span class=\"token comment\"># \u521b\u5efa\u672c\u5730\u5206\u652f\u5e76\u5173\u8054\u8fdc\u7a0b\u5206\u652f<\/span><br \/>\n<span class=\"token function\">git<\/span> checkout <span class=\"token parameter variable\">-b<\/span> \u672c\u5730\u5206\u652f\u540d origin\/\u8fdc\u7a0b\u5206\u652f\u540d<\/p>\n<p><span class=\"token comment\"># \u5df2\u6709\u672c\u5730\u5206\u652f&#xff0c;\u8bbe\u7f6e\u8ffd\u8e2a\u5173\u7cfb<\/span><br \/>\n<span class=\"token function\">git<\/span> branch &#8211;set-upstream-to<span class=\"token operator\">&#061;<\/span>origin\/\u8fdc\u7a0b\u5206\u652f\u540d \u672c\u5730\u5206\u652f\u540d<\/p>\n<h3>8.3 \u8fdc\u7a0b\u5206\u652f\u6e05\u7406<\/h3>\n<p>\u8fdc\u7a0b\u5220\u9664\u5206\u652f\u540e&#xff0c;\u672c\u5730\u4ecd\u4f1a\u6b8b\u7559\u8fdc\u7a0b\u5206\u652f\u5f15\u7528&#xff0c;\u53ef\u6e05\u7406&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u8fdc\u7a0b\u5206\u652f\u72b6\u6001<\/span><br \/>\n<span class=\"token function\">git<\/span> remote show origin<\/p>\n<p><span class=\"token comment\"># \u6e05\u7406\u5df2\u5220\u9664\u7684\u8fdc\u7a0b\u5206\u652f\u5f15\u7528<\/span><br \/>\n<span class=\"token function\">git<\/span> remote prune origin<\/p>\n<hr \/>\n<h2>9 ~&gt; \u4f01\u4e1a\u7ea7\u5f00\u53d1\u6a21\u578b<\/h2>\n<h3>9.1 DevOps \u4e0e\u7cfb\u7edf\u73af\u5883<\/h3>\n<h4>9.1.1 DevOps \u7406\u5ff5<\/h4>\n<p>\u6253\u7834\u5f00\u53d1&#xff08;Dev&#xff09;\u4e0e\u8fd0\u7ef4&#xff08;Ops&#xff09;\u7684\u90e8\u95e8\u5899&#xff0c;\u901a\u8fc7\u81ea\u52a8\u5316\u5de5\u5177\u4e0e\u6d41\u7a0b&#xff0c;\u5b9e\u73b0\u8f6f\u4ef6\u5feb\u901f\u3001\u53ef\u9760\u7684\u6784\u5efa\u3001\u6d4b\u8bd5\u3001\u53d1\u5e03\u4e0e\u8fd0\u7ef4\u3002Git \u662f DevOps \u4f53\u7cfb\u4e2d\u4ee3\u7801\u7ba1\u7406\u7684\u6838\u5fc3\u5de5\u5177\u3002<\/p>\n<h4>9.1.2 \u7cfb\u7edf\u5f00\u53d1\u73af\u5883<\/h4>\n<table>\n<tr>\u73af\u5883\u4f5c\u7528<\/tr>\n<tbody>\n<tr>\n<td>\u5f00\u53d1\u73af\u5883<\/td>\n<td>\u65e5\u5e38\u5f00\u53d1\u8c03\u8bd5&#xff0c;\u5f00\u542f\u5b8c\u6574\u9519\u8bef\u65e5\u5fd7<\/td>\n<\/tr>\n<tr>\n<td>\u6d4b\u8bd5\u73af\u5883<\/td>\n<td>\u5f00\u53d1\u5230\u751f\u4ea7\u7684\u8fc7\u6e21&#xff0c;\u529f\u80fd\u6d4b\u8bd5\u9a8c\u8bc1<\/td>\n<\/tr>\n<tr>\n<td>\u9884\u53d1\u5e03\u73af\u5883<\/td>\n<td>\u914d\u7f6e\u4e0e\u751f\u4ea7\u4e00\u81f4&#xff0c;\u4e0a\u7ebf\u524d\u6700\u540e\u9a8c\u8bc1<\/td>\n<\/tr>\n<tr>\n<td>\u751f\u4ea7\u73af\u5883<\/td>\n<td>\u6b63\u5f0f\u5bf9\u5916\u63d0\u4f9b\u670d\u52a1\u7684\u7ebf\u4e0a\u73af\u5883<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>9.2 Git Flow \u5206\u652f\u8bbe\u8ba1\u89c4\u8303<\/h3>\n<p>\u4f01\u4e1a\u6807\u51c6\u5206\u652f\u6a21\u578b&#xff0c;\u5bf9\u5e94\u4e0d\u540c\u5f00\u53d1\u73af\u5883&#xff1a;<\/p>\n<table>\n<tr>\u5206\u652f\u540d\u79f0\u5bf9\u5e94\u73af\u5883\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>master<\/td>\n<td>\u4e3b\u5206\u652f<\/td>\n<td>\u751f\u4ea7\u73af\u5883<\/td>\n<td>\u53ea\u8bfb&#xff0c;\u552f\u4e00\u7a33\u5b9a\u4ee3\u7801\u5e93&#xff0c;\u7531 release \u5408\u5e76\u800c\u6765&#xff0c;\u53d1\u5e03\u65f6\u6253 tag<\/td>\n<\/tr>\n<tr>\n<td>release<\/td>\n<td>\u9884\u53d1\u5e03\u5206\u652f<\/td>\n<td>\u6d4b\u8bd5\/\u9884\u53d1\u5e03\u73af\u5883<\/td>\n<td>\u57fa\u4e8e develop \u521b\u5efa&#xff0c;\u7528\u4e8e\u63d0\u6d4b&#xff0c;\u4e0a\u7ebf\u540e\u5408\u5e76\u5230 master<\/td>\n<\/tr>\n<tr>\n<td>develop<\/td>\n<td>\u5f00\u53d1\u5206\u652f<\/td>\n<td>\u5f00\u53d1\u73af\u5883<\/td>\n<td>\u53ea\u8bfb&#xff0c;\u4fdd\u6301\u6700\u65b0\u5f00\u53d1\u5b8c\u6210\u7684\u4ee3\u7801&#xff0c;\u7531 feature \u5408\u5e76\u800c\u6765<\/td>\n<\/tr>\n<tr>\n<td>feature<\/td>\n<td>\u529f\u80fd\u5206\u652f<\/td>\n<td>\u672c\u5730\u5f00\u53d1<\/td>\n<td>\u57fa\u4e8e develop \u521b\u5efa&#xff0c;\u6bcf\u4e2a\u65b0\u529f\u80fd\u4e00\u4e2a\u5206\u652f&#xff0c;\u5b8c\u6210\u540e\u5408\u5e76\u56de develop<\/td>\n<\/tr>\n<tr>\n<td>hotfix<\/td>\n<td>\u7d27\u6025\u4fee\u590d\u5206\u652f<\/td>\n<td>\u672c\u5730\u4fee\u590d<\/td>\n<td>\u57fa\u4e8e master \u521b\u5efa&#xff0c;\u4fee\u590d\u7ebf\u4e0a\u7d27\u6025 bug&#xff0c;\u5b8c\u6210\u540e\u5408\u5e76\u5230 master \u548c develop<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>9.3 \u4f01\u4e1a\u7ea7\u9879\u76ee\u5f00\u53d1\u6d41\u7a0b<\/h3>\n<h4>9.3.1 \u65b0\u9700\u6c42\u5f00\u53d1<\/h4>\n<li>\u57fa\u4e8e develop \u521b\u5efa feature \u5206\u652f\u5f00\u53d1<\/li>\n<li>\u5f00\u53d1\u5b8c\u6210\u53d1\u8d77\u4ee3\u7801\u8bc4\u5ba1&#xff0c;\u8bc4\u5ba1\u901a\u8fc7\u5408\u5e76\u5230 develop<\/li>\n<li>\u57fa\u4e8e develop \u521b\u5efa release \u5206\u652f&#xff0c;\u63d0\u4ea4\u6d4b\u8bd5<\/li>\n<li>\u6d4b\u8bd5\u901a\u8fc7\u540e&#xff0c;release \u5408\u5e76\u5230 master&#xff0c;\u6253\u6807\u7b7e\u53d1\u5e03<\/li>\n<li>\u540c\u6b65\u5408\u5e76\u56de develop&#xff0c;\u5220\u9664 feature\u3001release \u5206\u652f<\/li>\n<h4>9.3.2 \u7ebf\u4e0a Bug \u7d27\u6025\u4fee\u590d<\/h4>\n<li>\u57fa\u4e8e master \u521b\u5efa hotfix \u5206\u652f\u4fee\u590d<\/li>\n<li>\u4fee\u590d\u9a8c\u8bc1\u540e&#xff0c;\u5408\u5e76\u5230 master \u53d1\u5e03<\/li>\n<li>\u540c\u6b65\u5408\u5e76\u5230 develop \u5206\u652f&#xff0c;\u5220\u9664 hotfix \u5206\u652f<\/li>\n<h4>9.3.3 \u6d4b\u8bd5\/\u9884\u53d1\u5e03\u73af\u5883 Bug \u4fee\u590d<\/h4>\n<ul>\n<li>\u4f18\u5148\u5728\u5bf9\u5e94 feature \u5206\u652f\u4fee\u590d&#xff0c;\u518d\u91cd\u65b0\u8d70\u63d0\u6d4b\u6d41\u7a0b<\/li>\n<li>\u786e\u8ba4 develop \u5206\u652f\u662f\u5426\u5b58\u5728\u540c\u6837\u95ee\u9898&#xff0c;\u540c\u6b65\u4fee\u590d<\/li>\n<\/ul>\n<hr \/>\n<h2>\u7ed3\u5c3e<\/h2>\n<p><font color=\"#3498db\"> uu\u4eec&#xff0c;\u672c\u6587\u7684\u5185\u5bb9\u5230\u8fd9\u91cc\u5c31\u5168\u90e8\u7ed3\u675f\u4e86&#xff0c;\u827e\u8389\u4e1d\u5728\u8fd9\u91cc\u518d\u6b21\u611f\u8c22\u60a8\u7684\u9605\u8bfb&#xff01;<\/font><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<h3>\n<p>      <font color=\"#CC0000\">\u827e\u8389\u4e1d\u52aa\u529b\u7ec3\u5251<\/font><br \/>\n     <\/h3>\n<p><b><\/b><\/p>\n<p>     <font color=\"7B68EE\" size=\"4\">C\/C&#043;&#043; &amp; Linux \u5e95\u5c42\u63a2\u7d22\u8005 | \u4e00\u4e2a\u6b63\u5728\u52aa\u529b\u7ec3\u5251\u7684\u6280\u672f\u535a\u4e3b<\/font><\/p>\n<hr \/>\n<p>      &#x1f440;<br \/>\n      <b>\u3010\u5173\u6ce8\u3011<\/b> \u8ddf\u968f\u6211\u4e00\u8d77\u6df1\u8015\u6280\u672f\u9886\u57df&#xff0c;\u89c1\u8bc1\u6bcf\u4e00\u6b21\u6210\u957f\u3002<\/p>\n<p>      \u2764\ufe0f<br \/>\n      <b>\u3010\u70b9\u8d5e\u3011<\/b> \u8ba9\u4f18\u8d28\u5185\u5bb9\u88ab\u66f4\u591a\u4eba\u770b\u89c1&#xff0c;\u8ba9\u77e5\u8bc6\u4f20\u9012\u66f4\u6709\u529b\u91cf\u3002<\/p>\n<p>      \u2b50<br \/>\n      <b>\u3010\u6536\u85cf\u3011<\/b> \u628a\u6838\u5fc3\u77e5\u8bc6\u70b9\u5b58\u597d&#xff0c;\u5728\u9700\u8981\u65f6\u968f\u65f6\u67e5\u3001\u968f\u65f6\u7528\u3002<\/p>\n<p>      &#x1f4ac;<br \/>\n      <b>\u3010\u8bc4\u8bba\u3011<\/b> \u5206\u4eab\u4f60\u7684\u7ecf\u9a8c\u6216\u7591\u95ee&#xff0c;\u8bc4\u8bba\u533a\u4e00\u8d77\u4ea4\u6d41\u907f\u5751&#xff01;<\/p>\n<p><b><font color=\"#3498db\">\u4e0d\u8981\u5fd8\u8bb0\u7ed9\u535a\u4e3b\u201c\u4e00\u952e\u56db\u8fde\u201d\u54e6&#xff01;<\/font><\/b><\/p>\n<p>       <font color=\"#CC0000\">\u201c\u4eca\u65e5\u7ec3\u5251\u8fbe\u6210&#xff01;\u201d<\/font><\/p>\n<p>     <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260918202034-6aad9d124a88b.png\" width=\"200\" \/> <\/p>\n<p> <font color=\"#9b59b6\"> \u201c\u6280\u672f\u4e4b\u8def\u96be\u514d\u6709\u56f0\u60d1&#xff0c;\u4f46\u540c\u884c\u7684\u4eba\u4f1a\u8ba9\u524d\u8fdb\u66f4\u6709\u65b9\u5411\u3002\u201d <\/font><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><font color=\"#e74c3c\"> \u7ed3\u8bed&#xff1a;\u5e0c\u671b\u5bf9\u5b66\u4e60Linux\u76f8\u5173\u5185\u5bb9\u7684uu\u6709\u6240\u5e2e\u52a9&#xff0c;\u4e0d\u8981\u5fd8\u8bb0\u7ed9\u535a\u4e3b\u201c\u4e00\u952e\u56db\u8fde\u201d\u54e6&#xff01;<\/font><\/p>\n<p><font color=\"#9b59b6\">\u5f80\u671f\u56de\u987e&#xff1a;<\/font><\/p>\n<p>\u3010Git&#xff1a;\u4f01\u4e1a\u7ea7\u5f00\u53d1\u6a21\u578b\u3011Git\u4f01\u4e1a\u7ea7Git\u5de5\u4f5c\u6d41\u5b9e\u6218&#xff1a;\u57fa\u4e8eGit Flow\u7684\u5206\u652f\u6a21\u578b\u4e0e\u5f00\u53d1\u6d41\u7a0b<\/p>\n<p>  <font color=\"#CC0000\">&#x1f5e1;\u535a\u4e3b\u5728\u8fd9\u91cc\u653e\u4e86\u4e00\u53ea\u5c0f\u72d7&#xff0c;\u5927\u5bb6\u770b\u5b8c\u4e86\u6478\u6478\u5c0f\u72d7\u653e\u677e\u4e00\u4e0b\u5427&#xff01;&#x1f5e1; <\/font><\/p>\n<p>  <font color=\"#CC0000\">\u0aee\u208d \u02f6 \u02ca \u1d25 \u02cb\u02f6\u208e\u10d0 <\/font><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260918202034-6aad9d12ce052.gif\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#x1f3ac; \u4e2a\u4eba\u4e3b\u9875&#xff1a;\u827e\u8389\u4e1d\u52aa\u529b\u7ec3\u5251\u2744\u4e13\u680f\u4f20\u9001\u95e8&#xff1a;\u300aC\u8bed\u8a00\u300b\u300a\u6570\u636e\u7ed3\u6784\u4e0e\u7b97\u6cd5\u300b\u300aC\/C\u5e72\u8d27\u5206\u4eab&amp;\u5b66\u4e60\u8fc7\u7a0b\u8bb0\u5f55\u300b \u300aLinux\u64cd\u4f5c\u7cfb\u7edf\u7f16\u7a0b\u8be6\u89e3\u300b\u300a\u7b14\u8bd5\/\u9762\u8bd5\u5e38\u89c1\u7b97\u6cd5&#xff1a;\u4ece\u57fa\u7840\u5230\u8fdb\u9636\u300b\u300aPython\u5e72\u8d27\u5206\u4eab\u300b\u2b50\ufe0f\u4e3a\u5929\u5730\u7acb\u5fc3&#xff0c;\u4e3a\u751f\u6c11\u7acb\u547d&#xff0c;\u4e3a\u5f80\u5723\u7ee7\u7edd\u5b66&#xff0c;\u4e3a\u4e07\u4e16\u5f00\u592a\u5e73 &#x1f3ac; \u827e\u8389\u4e1d\u7684\u7b80\u4ecb&#xff1a; \u6587\u7ae0\u76ee\u5f551 ~&gt; \u5b66\u4e60\u76ee\u68071.1 \u6280\u672f\u76ee\u68071.2 \u534f\u4f5c\u76ee\u68072 ~&gt; Git \u521d\u8bc6<\/p>\n","protected":false},"author":2,"featured_media":107163,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[11653,1299,89,50,323,176],"topic":[],"class_list":["post-107168","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-11653","tag-elasticsearch","tag-git","tag-50","tag-323","tag-176"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010Git\uff1a\u7efc\u5408\u590d\u76d8\u3011Git \u539f\u7406\u4e0e\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/107168.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010Git\uff1a\u7efc\u5408\u590d\u76d8\u3011Git \u539f\u7406\u4e0e\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"&#x1f3ac; \u4e2a\u4eba\u4e3b\u9875&#xff1a;\u827e\u8389\u4e1d\u52aa\u529b\u7ec3\u5251\u2744\u4e13\u680f\u4f20\u9001\u95e8&#xff1a;\u300aC\u8bed\u8a00\u300b\u300a\u6570\u636e\u7ed3\u6784\u4e0e\u7b97\u6cd5\u300b\u300aC\/C\u5e72\u8d27\u5206\u4eab&amp;\u5b66\u4e60\u8fc7\u7a0b\u8bb0\u5f55\u300b \u300aLinux\u64cd\u4f5c\u7cfb\u7edf\u7f16\u7a0b\u8be6\u89e3\u300b\u300a\u7b14\u8bd5\/\u9762\u8bd5\u5e38\u89c1\u7b97\u6cd5&#xff1a;\u4ece\u57fa\u7840\u5230\u8fdb\u9636\u300b\u300aPython\u5e72\u8d27\u5206\u4eab\u300b\u2b50\ufe0f\u4e3a\u5929\u5730\u7acb\u5fc3&#xff0c;\u4e3a\u751f\u6c11\u7acb\u547d&#xff0c;\u4e3a\u5f80\u5723\u7ee7\u7edd\u5b66&#xff0c;\u4e3a\u4e07\u4e16\u5f00\u592a\u5e73 &#x1f3ac; \u827e\u8389\u4e1d\u7684\u7b80\u4ecb&#xff1a; \u6587\u7ae0\u76ee\u5f551 ~&gt; \u5b66\u4e60\u76ee\u68071.1 \u6280\u672f\u76ee\u68071.2 \u534f\u4f5c\u76ee\u68072 ~&gt; Git \u521d\u8bc6\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/107168.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-18T20:20:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260918202033-6aad9d11a7e92.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/107168.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/107168.html\",\"name\":\"\u3010Git\uff1a\u7efc\u5408\u590d\u76d8\u3011Git \u539f\u7406\u4e0e\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-18T20:20:35+00:00\",\"dateModified\":\"2026-09-18T20:20:35+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/107168.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/107168.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/107168.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010Git\uff1a\u7efc\u5408\u590d\u76d8\u3011Git \u539f\u7406\u4e0e\u4f7f\u7528\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010Git\uff1a\u7efc\u5408\u590d\u76d8\u3011Git \u539f\u7406\u4e0e\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/107168.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010Git\uff1a\u7efc\u5408\u590d\u76d8\u3011Git \u539f\u7406\u4e0e\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"&#x1f3ac; \u4e2a\u4eba\u4e3b\u9875&#xff1a;\u827e\u8389\u4e1d\u52aa\u529b\u7ec3\u5251\u2744\u4e13\u680f\u4f20\u9001\u95e8&#xff1a;\u300aC\u8bed\u8a00\u300b\u300a\u6570\u636e\u7ed3\u6784\u4e0e\u7b97\u6cd5\u300b\u300aC\/C\u5e72\u8d27\u5206\u4eab&amp;\u5b66\u4e60\u8fc7\u7a0b\u8bb0\u5f55\u300b \u300aLinux\u64cd\u4f5c\u7cfb\u7edf\u7f16\u7a0b\u8be6\u89e3\u300b\u300a\u7b14\u8bd5\/\u9762\u8bd5\u5e38\u89c1\u7b97\u6cd5&#xff1a;\u4ece\u57fa\u7840\u5230\u8fdb\u9636\u300b\u300aPython\u5e72\u8d27\u5206\u4eab\u300b\u2b50\ufe0f\u4e3a\u5929\u5730\u7acb\u5fc3&#xff0c;\u4e3a\u751f\u6c11\u7acb\u547d&#xff0c;\u4e3a\u5f80\u5723\u7ee7\u7edd\u5b66&#xff0c;\u4e3a\u4e07\u4e16\u5f00\u592a\u5e73 &#x1f3ac; \u827e\u8389\u4e1d\u7684\u7b80\u4ecb&#xff1a; \u6587\u7ae0\u76ee\u5f551 ~&gt; \u5b66\u4e60\u76ee\u68071.1 \u6280\u672f\u76ee\u68071.2 \u534f\u4f5c\u76ee\u68072 ~&gt; Git \u521d\u8bc6","og_url":"https:\/\/www.wsisp.com\/helps\/107168.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-18T20:20:35+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260918202033-6aad9d11a7e92.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/107168.html","url":"https:\/\/www.wsisp.com\/helps\/107168.html","name":"\u3010Git\uff1a\u7efc\u5408\u590d\u76d8\u3011Git \u539f\u7406\u4e0e\u4f7f\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-18T20:20:35+00:00","dateModified":"2026-09-18T20:20:35+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/107168.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/107168.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/107168.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010Git\uff1a\u7efc\u5408\u590d\u76d8\u3011Git \u539f\u7406\u4e0e\u4f7f\u7528"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/107168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=107168"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/107168\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/107163"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=107168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=107168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=107168"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=107168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}