{"id":43632,"date":"2023-12-11T15:00:24","date_gmt":"2023-12-11T07:00:24","guid":{"rendered":"https:\/\/wx.kaifamiao.info\/?p=43632"},"modified":"2023-12-11T15:00:24","modified_gmt":"2023-12-11T07:00:24","slug":"git%e5%b8%b8%e7%94%a8%e5%91%bd%e4%bb%a4-3","status":"publish","type":"post","link":"http:\/\/wx.kaifamiao.info\/index.php\/2023\/12\/11\/git%e5%b8%b8%e7%94%a8%e5%91%bd%e4%bb%a4-3\/","title":{"rendered":"git\u5e38\u7528\u547d\u4ee4"},"content":{"rendered":"<p>&#8220;`&#8221;<\/p>\n<p>Workspace:\u5de5\u4f5c\u533a<br \/>\nIndex\/Stage:\u6682\u5b58\u533a<br \/>\nRepository:\u4ed3\u5e93\u533a\uff08\u6216\u672c\u5730\u4ed3\u5e93\uff09<br \/>\nRemote:\u8fdc\u7a0b\u4ed3\u5e93<br \/>\ngit init; (# \u5728\u5f53\u524d\u76ee\u5f55\u65b0\u5efa\u4e00\u4e2aGit\u4ee3\u7801\u5e93)<br \/>\ngit add \uff08\u6dfb\u52a0\u5f53\u524d\u76ee\u5f55\u7684\u6240\u6709\u6587\u4ef6\u5230\u6682\u5b58\u533a\uff09<br \/>\ngit rm \u2013cached [file] (# \u505c\u6b62\u8ffd\u8e2a\u6307\u5b9a\u6587\u4ef6\uff0c\u4f46\u8be5\u6587\u4ef6\u4f1a\u4fdd\u7559\u5728\u5de5\u4f5c\u533a)<br \/>\ngit commit [file1] [file2] -m [message] (# \u63d0\u4ea4\u6682\u5b58\u533a\u7684\u6307\u5b9a\u6587\u4ef6\u5230\u4ed3\u5e93\u533a )<br \/>\ngit branch -a (\u5217\u51fa\u6240\u6709\u672c\u5730\u5206\u652f\u548c\u8fdc\u7a0b\u5206\u652f)<br \/>\ngit checkout [branch-name] (# \u5207\u6362\u5230\u6307\u5b9a\u5206\u652f\uff0c\u5e76\u66f4\u65b0\u5de5\u4f5c\u533a)<br \/>\ngit status( # \u663e\u793a\u6709\u53d8\u66f4\u7684\u6587\u4ef6)<br \/>\ngit push [remote] -tags (# \u63d0\u4ea4\u6240\u6709tag)<br \/>\n\u8be6\u7ec6\u53c2\u89c1\uff1a&lt;a class=&quot;&quot;url&quot;&quot; href=&quot;&quot;http:\/\/www.ruanyifeng.com\/blog\/2015\/12\/git&quot;&quot; target=&quot;&quot;_blank&quot;&quot;&gt;http:\/\/www.ruanyifeng.com\/blog\/2015\/12\/git&lt;\/a&gt;\u4e00cheat\u4e00sheet.html<\/p>\n<p>&lt;pre&gt;&lt;code&gt;            &quot;&#8220;`<br \/>\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;`&#8221; Workspace:\u5de5\u4f5c\u533a Index\/Stage:\u6682\u5b58\u533a Repositor [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-43632","post","type-post","status-publish","format-standard","hentry","category-c"],"_links":{"self":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/43632","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/comments?post=43632"}],"version-history":[{"count":1,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/43632\/revisions"}],"predecessor-version":[{"id":43633,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/43632\/revisions\/43633"}],"wp:attachment":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/media?parent=43632"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/categories?post=43632"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/tags?post=43632"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}