{"id":16640,"date":"2024-11-21T10:07:46","date_gmt":"2024-11-21T02:07:46","guid":{"rendered":"https:\/\/92it.top\/?p=16640"},"modified":"2024-11-21T10:17:22","modified_gmt":"2024-11-21T02:17:22","slug":"git-%e6%9c%ac%e5%9c%b0%e4%bb%93%e5%ba%93%e5%92%8c%e8%bf%9c%e7%a8%8b%e4%bb%93%e5%ba%93%e7%9a%84%e5%85%b3%e7%b3%bb","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=16640","title":{"rendered":"Git \u672c\u5730\u4ed3\u5e93\u548c\u8fdc\u7a0b\u4ed3\u5e93\u7684\u5173\u7cfb"},"content":{"rendered":"\n<p><strong>1. \u672c\u5730\u4ed3\u5e93\u548c\u8fdc\u7a0b\u4ed3\u5e93\u7684\u5173\u7cfb<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"234\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-144-1024x234.png\" alt=\"\" class=\"wp-image-16652\" style=\"width:486px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-144-1024x234.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-144-300x69.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-144-768x176.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-144-830x190.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-144-230x53.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-144-350x80.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-144-480x110.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-144.png 1102w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<ul>\n<li><strong>\u672c\u5730\u4ed3\u5e93<\/strong>\uff1a\n<ul>\n<li>\u5b58\u50a8\u5728\u4f60\u672c\u5730\u7535\u8111\u4e0a\u7684 Git \u4ed3\u5e93\uff0c\u5305\u542b\u9879\u76ee\u7684\u7248\u672c\u5386\u53f2\u548c\u4f60\u7684\u5f53\u524d\u5f00\u53d1\u5de5\u4f5c\u3002<\/li>\n\n\n\n<li>\u5f00\u53d1\u8005\u5728\u672c\u5730\u8fdb\u884c\u4fee\u6539\u3001\u63d0\u4ea4\u3001\u5206\u652f\u7ba1\u7406\u7b49\u64cd\u4f5c\u3002<\/li>\n\n\n\n<li>\u63d0\u4ea4\u4e0d\u4f1a\u81ea\u52a8\u540c\u6b65\u5230\u8fdc\u7a0b\u4ed3\u5e93\uff0c\u5fc5\u987b\u624b\u52a8\u63a8\u9001\uff08push\uff09\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u8fdc\u7a0b\u4ed3\u5e93<\/strong>\uff1a\n<ul>\n<li>\u901a\u5e38\u6258\u7ba1\u5728\u670d\u52a1\u5668\u4e0a\uff08\u5982 GitHub\u3001GitLab\u3001Bitbucket\uff09\uff0c\u4f9b\u56e2\u961f\u6210\u5458\u5171\u4eab\u3002<\/li>\n\n\n\n<li>\u53ea\u6709\u901a\u8fc7**\u63a8\u9001\uff08push\uff09<strong>\u6216<\/strong>\u62c9\u53d6\uff08pull\uff09**\u64cd\u4f5c\uff0c\u8fdc\u7a0b\u4ed3\u5e93\u548c\u672c\u5730\u4ed3\u5e93\u4e4b\u95f4\u624d\u4f1a\u540c\u6b65\u63d0\u4ea4\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p><strong>2. \u63d0\u4ea4\uff08commit\uff09\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u7684\u533a\u522b<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>\u672c\u5730\u63d0\u4ea4<\/strong>\uff1a<\/p>\n\n\n\n<ul>\n<li>\u6bcf\u6b21\u8fd0\u884c <code>git commit<\/code>\uff0c\u63d0\u4ea4\u8bb0\u5f55\u53ea\u4fdd\u5b58\u5728\u672c\u5730\u4ed3\u5e93\u4e2d\u3002<\/li>\n\n\n\n<li>\u8fd9\u4e9b\u63d0\u4ea4\u9700\u8981\u901a\u8fc7 <code>git push<\/code> \u547d\u4ee4\u63a8\u9001\u5230\u8fdc\u7a0b\u4ed3\u5e93\uff0c\u624d\u80fd\u8ba9\u5176\u4ed6\u4eba\u770b\u5230\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u8fdc\u7a0b\u63d0\u4ea4<\/strong>\uff1a<\/p>\n\n\n\n<ul>\n<li>\u8fdc\u7a0b\u4ed3\u5e93\u7684\u63d0\u4ea4\u8bb0\u5f55\u6765\u81ea\u5176\u4ed6\u5f00\u53d1\u8005\u7684\u63a8\u9001\u6216\u4f60\u7684\u672c\u5730\u63a8\u9001\u3002<\/li>\n\n\n\n<li>\u5982\u679c\u4f60\u60f3\u83b7\u53d6\u8fdc\u7a0b\u7684\u65b0\u63d0\u4ea4\u8bb0\u5f55\uff0c\u9700\u8fd0\u884c <code>git pull<\/code> \u6216 <code>git fetch<\/code> \u547d\u4ee4\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>3. \u63d0\u4ea4\u540c\u6b65\u7684\u6d41\u7a0b<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<ul>\n<li><strong>\u672c\u5730\u63d0\u4ea4\u5230\u8fdc\u7a0b\uff1a<\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git add &lt;file>\ngit commit -m \"\u672c\u5730\u7684\u63d0\u4ea4\u8bb0\u5f55\"\ngit push origin &lt;branch>\n<\/pre>\n\n\n\n<p>\u4e0a\u8ff0\u6b65\u9aa4\u4f1a\u5c06\u4f60\u7684\u672c\u5730\u63d0\u4ea4\u8bb0\u5f55\u63a8\u9001\u5230\u8fdc\u7a0b\u4ed3\u5e93\u7684\u5bf9\u5e94\u5206\u652f\u3002<\/p>\n\n\n\n<ul>\n<li><strong>\u8fdc\u7a0b\u540c\u6b65\u5230\u672c\u5730<\/strong>\uff1a<\/li>\n<\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git pull origin &lt;branch><\/pre>\n\n\n\n<p>\u62c9\u53d6\uff08pull\uff09\u64cd\u4f5c\u5c06\u8fdc\u7a0b\u63d0\u4ea4\u8bb0\u5f55\u5408\u5e76\u5230\u4f60\u7684\u672c\u5730\u4ed3\u5e93\u3002<\/p>\n\n\n\n<p><strong>4. \u672c\u5730\u548c\u8fdc\u7a0b\u63d0\u4ea4\u7684\u5bf9\u6bd4<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b\u672c\u5730\u548c\u8fdc\u7a0b\u63d0\u4ea4\u662f\u5426\u540c\u6b65\uff1a<\/p>\n\n\n\n<ul>\n<li><strong>\u67e5\u770b\u8fdc\u7a0b\u63d0\u4ea4\u65e5\u5fd7<\/strong>\uff1a<\/li>\n<\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git log origin\/&lt;branch><\/pre>\n\n\n\n<p>\u663e\u793a\u8fdc\u7a0b\u4ed3\u5e93\u7684\u63d0\u4ea4\u8bb0\u5f55\u3002<\/p>\n\n\n\n<ul>\n<li><strong>\u6bd4\u8f83\u672c\u5730\u548c\u8fdc\u7a0b\u63d0\u4ea4<\/strong>\uff1a<\/li>\n<\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git log HEAD..origin\/&lt;branch> # \u67e5\u770b\u8fdc\u7a0b\u6709\u4f46\u672c\u5730\u6ca1\u6709\u7684\u63d0\u4ea4\ngit log origin\/&lt;branch>..HEAD # \u67e5\u770b\u672c\u5730\u6709\u4f46\u8fdc\u7a0b\u6ca1\u6709\u7684\u63d0\u4ea4<\/pre>\n\n\n\n<p><strong>5. \u573a\u666f\u89e3\u6790<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>\u672c\u5730\u6709\u63d0\u4ea4\uff0c\u8fdc\u7a0b\u6ca1\u6709<\/strong><\/p>\n\n\n\n<ul>\n<li>\u8bf4\u660e\u4f60\u672c\u5730\u4ee3\u7801\u5df2\u63d0\u4ea4\uff0c\u4f46\u6ca1\u6709\u6267\u884c <code>git push<\/code>\u3002<\/li>\n\n\n\n<li>\u89e3\u51b3\u65b9\u6cd5\uff1a\u6267\u884c <code>git push<\/code>\uff0c\u540c\u6b65\u672c\u5730\u63d0\u4ea4\u5230\u8fdc\u7a0b\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u8fdc\u7a0b\u6709\u63d0\u4ea4\uff0c\u672c\u5730\u6ca1\u6709<\/strong><\/p>\n\n\n\n<ul>\n<li>\u8bf4\u660e\u5176\u4ed6\u5f00\u53d1\u8005\u63a8\u9001\u4e86\u65b0\u63d0\u4ea4\uff0c\u800c\u4f60\u6ca1\u6709\u62c9\u53d6\u66f4\u65b0\u3002<\/li>\n\n\n\n<li>\u89e3\u51b3\u65b9\u6cd5\uff1a\u6267\u884c <code>git pull<\/code> \u6216 <code>git fetch<\/code> \u540c\u6b65\u8fdc\u7a0b\u7684\u63d0\u4ea4\u8bb0\u5f55\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u672c\u5730\u548c\u8fdc\u7a0b\u63d0\u4ea4\u51b2\u7a81<\/strong><\/p>\n\n\n\n<ul>\n<li>\u5982\u679c\u4f60\u548c\u5176\u4ed6\u5f00\u53d1\u8005\u5bf9\u540c\u4e00\u6587\u4ef6\u7684\u76f8\u540c\u90e8\u5206\u505a\u4e86\u4fee\u6539\uff0c\u5c31\u4f1a\u5bfc\u81f4\u51b2\u7a81\u3002<\/li>\n\n\n\n<li>\u89e3\u51b3\u65b9\u6cd5\uff1a\u5728\u62c9\u53d6\u8fdc\u7a0b\u63d0\u4ea4\u65f6\uff0cGit \u4f1a\u63d0\u793a\u51b2\u7a81\uff0c\u9700\u8981\u624b\u52a8\u89e3\u51b3\u540e\u518d\u63d0\u4ea4\u5408\u5e76\u7ed3\u679c\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>6.Git\u5728\u7ec8\u7aef\u4ee5\u53ef\u89c6\u5316\u7684\u65b9\u5f0f\u67e5\u770b\u63d0\u4ea4\u60c5\u51b5<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u8981\u4f7f\u7528 Git \u67e5\u770b\u6811\u72b6\u63d0\u4ea4\u60c5\u51b5\uff0c\u53ef\u4ee5\u4f7f\u7528git log\u547d\u4ee4\u7684&#8211;graph \u9009\u9879\u3002\u8fd9\u4e2a\u9009\u9879\u4f1a\u4ee5\u6811\u72b6\u56fe\u7684\u5f62\u5f0f\u663e\u793a\u63d0\u4ea4\u5386\u53f2\uff0c\u6e05\u6670\u5730\u5c55\u793a\u6bcf\u4e2a\u63d0\u4ea4\u7684\u5206\u652f\u5408\u5e76\u60c5\u51b5\u548c\u5206\u652f\u95f4\u7684\u5173\u7cfb<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git log --graph<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"561\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-139-1024x561.png\" alt=\"\" class=\"wp-image-16642\" style=\"width:540px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-139-1024x561.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-139-300x164.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-139-768x421.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-139-830x455.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-139-230x126.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-139-350x192.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-139-480x263.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-139.png 1238w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p><strong>7.<code>gitk<\/code> \u548c <code>git-gui<\/code><\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5728\u5b89\u88c5 Git \u7684\u540c\u65f6\uff0c\u4f60\u4e5f\u88c5\u597d\u4e86\u5b83\u63d0\u4f9b\u7684\u53ef\u89c6\u5316\u5de5\u5177\uff0c<code>gitk<\/code> \u548c <code>git-gui<\/code>\u3002<\/p>\n\n\n\n<p><code>gitk<\/code> \u662f\u4e00\u4e2a\u5386\u53f2\u8bb0\u5f55\u7684\u56fe\u5f62\u5316\u67e5\u770b\u5668\u3002 \u4f60\u53ef\u4ee5\u628a\u5b83\u5f53\u4f5c\u662f\u57fa\u4e8e <code>git log<\/code> \u548c <code>git grep<\/code> \u547d\u4ee4\u7684\u4e00\u4e2a\u5f3a\u5927\u7684\u56fe\u5f62\u64cd\u4f5c\u754c\u9762\u3002 \u5f53\u4f60\u9700\u8981\u67e5\u627e\u8fc7\u53bb\u53d1\u751f\u7684\u67d0\u6b21\u8bb0\u5f55\uff0c\u6216\u662f\u53ef\u89c6\u5316\u67e5\u770b\u9879\u76ee\u5386\u53f2\u7684\u65f6\u5019\uff0c\u4f60\u5c06\u4f1a\u7528\u5230\u8fd9\u4e2a\u5de5\u5177\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528 Gitk \u7684\u6700\u7b80\u5355\u65b9\u6cd5\u5c31\u662f\u4ece\u547d\u4ee4\u884c\u6253\u5f00\u3002 \u53ea\u9700 <code>cd<\/code> \u5230\u4e00\u4e2a Git \u4ed3\u5e93\uff0c\u7136\u540e\u952e\u5165\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$ gitk \n<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"694\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-142-1024x694.png\" alt=\"\" class=\"wp-image-16646\" style=\"width:442px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-142-1024x694.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-142-300x203.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-142-768x520.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-142-830x562.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-142-230x156.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-142-350x237.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-142-480x325.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-142.png 1302w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u8fd9\u5f20\u56fe\u770b\u8d77\u6765\u5c31\u548c\u6267\u884c <code>git log --graph<\/code> \u547d\u4ee4\u7684\u8f93\u51fa\u5dee\u4e0d\u591a\uff1b\u6bcf\u4e2a\u70b9\u4ee3\u8868\u4e00\u6b21\u63d0\u4ea4\uff0c\u7ebf\u4ee3\u8868\u7236\u5b50\u5173\u7cfb\uff0c\u800c\u5f69\u8272\u7684\u65b9\u5757\u5219\u7528\u6765\u6807\u793a\u4e00\u4e2a\u4e2a\u5f15\u7528\u3002 \u9ec4\u70b9\u8868\u793a HEAD\uff0c\u7ea2\u70b9\u8868\u793a\u5c1a\u672a\u63d0\u4ea4\u7684\u672c\u5730\u53d8\u52a8\u3002 \u4e0b\u65b9\u7684\u7a97\u53e3\u7528\u6765\u663e\u793a\u5f53\u524d\u9009\u4e2d\u7684\u63d0\u4ea4\u7684\u5177\u4f53\u4fe1\u606f\uff1b\u8bc4\u8bba\u548c\u8865\u4e01\u663e\u793a\u5728\u5de6\u4fa7\uff0c\u6458\u8981\u663e\u793a\u5728\u53f3\u4fa7\u3002 \u4e2d\u95f4\u5219\u662f\u4e00\u7ec4\u7528\u6765\u641c\u7d22\u5386\u53f2\u7684\u63a7\u4ef6\u3002<\/p>\n\n\n\n<p>\u4e0e\u4e4b\u76f8\u6bd4\uff0c<code>git-gui<\/code> \u5219\u4e3b\u8981\u662f\u4e00\u4e2a\u7528\u6765\u5236\u4f5c\u63d0\u4ea4\u7684\u5de5\u5177\u3002 \u6253\u5f00\u5b83\u7684\u6700\u7b80\u5355\u65b9\u6cd5\u4e5f\u662f\u4ece\u547d\u4ee4\u884c\u542f\u52a8\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$ git gui\n<\/pre>\n\n\n\n<p>\u5b83\u7684\u754c\u9762\u957f\u8fd9\u4e2a\u6837\u5b50\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"600\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-141-1024x600.png\" alt=\"\" class=\"wp-image-16645\" style=\"width:526px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-141-1024x600.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-141-300x176.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-141-768x450.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-141-830x487.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-141-230x135.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-141-350x205.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-141-480x281.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/11\/image-141.png 1358w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u5de6\u4fa7\u662f\u7d22\u5f15\u533a\uff0c\u672a\u6682\u5b58\u7684\u4fee\u6539\u663e\u793a\u5728\u4e0a\u65b9\uff0c\u5df2\u6682\u5b58\u7684\u4fee\u6539\u663e\u793a\u5728\u4e0b\u65b9\u3002 \u4f60\u53ef\u4ee5\u901a\u8fc7\u70b9\u51fb\u6587\u4ef6\u540d\u5de6\u4fa7\u7684\u56fe\u6807\u6765\u5c06\u8be5\u6587\u4ef6\u5728\u6682\u5b58\u72b6\u6001\u4e0e\u672a\u6682\u5b58\u72b6\u6001\u4e4b\u95f4\u5207\u6362\uff0c\u4f60\u4e5f\u53ef\u4ee5\u901a\u8fc7\u9009\u4e2d\u4e00\u4e2a\u6587\u4ef6\u540d\u6765\u67e5\u770b\u5b83\u7684\u8be6\u60c5\u3002<\/p>\n\n\n\n<p>\u53f3\u4fa7\u7a97\u53e3\u7684\u4e0a\u65b9\u4ee5 diff \u683c\u5f0f\u6765\u663e\u793a\u5f53\u524d\u9009\u4e2d\u6587\u4ef6\u53d1\u751f\u4e86\u53d8\u52a8\u7684\u5730\u65b9\u3002 \u4f60\u53ef\u4ee5\u901a\u8fc7\u53f3\u51fb\u67d0\u4e00\u533a\u5757\u6216\u884c\u4ece\u800c\u5c06\u8fd9\u4e00\u533a\u5757\u6216\u884c\u653e\u5165\u6682\u5b58\u533a\u3002<\/p>\n\n\n\n<p>\u53f3\u4fa7\u7a97\u53e3\u7684\u4e0b\u65b9\u662f\u5199\u65e5\u5fd7\u548c\u6267\u884c\u64cd\u4f5c\u7684\u5730\u65b9\u3002 \u5728\u6587\u672c\u6846\u4e2d\u952e\u5165\u65e5\u5fd7\u7136\u540e\u70b9\u51fb\u201c\u63d0\u4ea4\u201d\u5c31\u548c\u6267\u884c <code>git commit<\/code> \u7684\u6548\u679c\u5dee\u4e0d\u591a\u3002 \u5982\u679c\u4f60\u60f3\u8981\u4fee\u8ba2\u4e0a\u4e00\u6b21\u63d0\u4ea4, \u53ef\u4ee5\u9009\u4e2d\u201c\u4fee\u8ba2\u201d\u6309\u94ae\uff0c\u4e0a\u6b21\u4e00\u63d0\u4ea4\u7684\u5185\u5bb9\u5c31\u4f1a\u663e\u793a\u5728\u201c\u6682\u5b58\u533a\u201d\u3002 \u7136\u540e\u4f60\u5c31\u53ef\u4ee5\u7b80\u5355\u7684\u5bf9\u4fee\u6539\u8fdb\u884c\u6682\u5b58\u548c\u53d6\u6d88\u6682\u5b58\u64cd\u4f5c\uff0c\u66f4\u65b0\u63d0\u4ea4\u65e5\u5fd7\uff0c\u7136\u540e\u518d\u6b21\u70b9\u51fb\u201c\u63d0\u4ea4\u201d\u7528\u8fd9\u4e2a\u65b0\u7684\u63d0\u4ea4\u6765\u8986\u76d6\u4e0a\u4e00\u6b21\u63d0\u4ea4\u3002<\/p>\n\n\n\n<p><code>gitk<\/code> \u548c <code>git-gui<\/code> \u5c31\u662f\u9488\u5bf9\u67d0\u79cd\u4efb\u52a1\u8bbe\u8ba1\u7684\u5de5\u5177\u7684\u4e24\u4e2a\u4f8b\u5b50\u3002 \u5b83\u4eec\u5206\u522b\u4e3a\u4e86\u4e0d\u540c\u7684\u76ee\u7684\uff08\u5373\u67e5\u770b\u5386\u53f2\u548c\u5236\u4f5c\u63d0\u4ea4\uff09\u800c\u8fdb\u884c\u4e86\u7cbe\u7b80\uff0c\u7565\u53bb\u4e86\u7528\u4e0d\u5230\u7684\u529f\u80fd\u3002<\/p>\n\n\n\n<p><strong>\u603b\u7ed3<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<ul>\n<li>\u672c\u5730\u4ed3\u5e93\u548c\u8fdc\u7a0b\u4ed3\u5e93\u5404\u81ea\u72ec\u7acb\u4fdd\u5b58\u63d0\u4ea4\u8bb0\u5f55\u3002<\/li>\n\n\n\n<li>\u63d0\u4ea4\u4e0d\u4f1a\u81ea\u52a8\u540c\u6b65\uff0c\u5fc5\u987b\u901a\u8fc7 <code>git push<\/code> \u548c <code>git pull<\/code> \u64cd\u4f5c\u3002<\/li>\n\n\n\n<li>\u5bf9\u4e8e\u56e2\u961f\u534f\u4f5c\uff0c\u53ca\u65f6\u540c\u6b65\u63d0\u4ea4\u8bb0\u5f55\uff08\u63a8\u9001\u548c\u62c9\u53d6\uff09\u975e\u5e38\u91cd\u8981\uff0c\u786e\u4fdd\u6240\u6709\u5f00\u53d1\u8005\u90fd\u5728\u540c\u4e00\u4e2a\u7248\u672c\u57fa\u7840\u4e0a\u5de5\u4f5c\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>1. \u672c\u5730\u4ed3\u5e93\u548c\u8fdc\u7a0b\u4ed3\u5e93\u7684\u5173\u7cfb 2. \u63d0\u4ea4\uff08commit\uff09\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u7684\u533a\u522b \u672c\u5730\u63d0\u4ea4\uff1a \u8fdc\u7a0b\u63d0\u4ea4\uff1a 3. \u63d0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/16640"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16640"}],"version-history":[{"count":5,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/16640\/revisions"}],"predecessor-version":[{"id":16653,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/16640\/revisions\/16653"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16640"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16640"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16640"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}