{"id":313,"date":"2026-03-02T23:41:16","date_gmt":"2026-03-02T15:41:16","guid":{"rendered":"https:\/\/zljlld.xyz\/?p=313"},"modified":"2026-03-03T23:15:35","modified_gmt":"2026-03-03T15:15:35","slug":"git-%e5%b8%b8%e7%94%a8%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"https:\/\/zljlld.xyz\/index.php\/2026\/03\/02\/git-%e5%b8%b8%e7%94%a8%e5%91%bd%e4%bb%a4\/","title":{"rendered":"git \u5e38\u7528\u547d\u4ee4"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u57fa\u7840<\/h2>\n\n\n\n<p># \u521d\u59cb\u5316 Git \u4ed3\u5e93\uff08\u751f\u6210\u9690\u85cf\u7684 .git \u6587\u4ef6\u5939\uff09 <br>git init<br><br># \u5173\u8054\u8fdc\u7a0b\u4ed3\u5e93\uff08\u4ec5\u7b2c\u4e00\u6b21\u9700\u8981\uff09 <br>git remote add origin \u8fdc\u7a0b\u4ed3\u5e93\u5730\u5740<\/p>\n\n\n\n<p># \u67e5\u770b\u5f53\u524d\u72b6\u6001\uff08\u6539\u4e86\u54ea\u4e9b\u6587\u4ef6\uff09 <br>git status <br><br># \u628a\u6587\u4ef6\u52a0\u5165\u6682\u5b58\u533a <br>git add \u6587\u4ef6\u540d <br><br># \u4e00\u6b21\u6027\u6dfb\u52a0\u6240\u6709\u4fee\u6539 <br>git add . <br><br># \u63d0\u4ea4\u4ee3\u7801\uff08\u987b\u5199\u5907\u6ce8\uff09 <br>git commit -m &#8220;\u8fd9\u91cc\u5199\u4f60\u6539\u4e86\u4ec0\u4e48&#8221; <br><br># \u63a8\u9001\u5230\u4e91\u7aef\uff08GitHub\/Gitee\uff09 <br>git push<br><br># \u63a8\u9001\u5230\u8fdc\u7a0b main \u5206\u652f <br>git push -u origin main<br><br># \u67e5\u770b\u5f53\u524d\u5206\u652f<br>git branch<br><br># \u63a8\u9001\u672c\u5730\u5206\u652f\u5e76\u5728\u8fdc\u7a0b\u521b\u5efa\u540c\u540d\u5206\u652f ( ASR_test \u4e3a\u65b0\u7684\u5206\u652f\u540d)<br>git push -u origin HEAD:ASR_test<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5e38\u7528\u5b8c\u6574\u6d41\u7a0b<\/h2>\n\n\n\n<p>git add . (\u653e\u8fdb\u7bee\u5b50)<br>git commit -m &#8220;\u5b8c\u6210XX\u529f\u80fd&#8221; (\u6253\u5305)<br>git pull (\u4e0b\u8f7d\u6700\u65b0\u7684\u53d8\u66f4)<br>git push(\u63a8\u9001\u5230\u4e91\u7aef)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e0b\u8f7d\u9879\u76ee<\/h2>\n\n\n\n<p># \u4ece\u7f51\u4e0a\u514b\u9686\u9879\u76ee <br>git clone \u9879\u76ee\u5730\u5740<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u540c\u6b65\u522b\u4eba\u7684\u4ee3\u7801<\/h2>\n\n\n\n<p># \u62c9\u53d6\u6700\u65b0\u4ee3\u7801\uff08\u522b\u4eba\u66f4\u65b0\u540e\uff0c\u540c\u6b65\uff09 <br>git pull<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u57fa\u7840 # \u521d\u59cb\u5316 Git \u4ed3\u5e93\uff08\u751f\u6210\u9690\u85cf\u7684 .git \u6587\u4ef6\u5939\uff09 git init # \u5173\u8054\u8fdc\u7a0b\u4ed3\u5e93\uff08\u4ec5\u7b2c\u4e00\u6b21\u9700 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-313","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/zljlld.xyz\/index.php\/wp-json\/wp\/v2\/posts\/313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zljlld.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zljlld.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zljlld.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zljlld.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=313"}],"version-history":[{"count":9,"href":"https:\/\/zljlld.xyz\/index.php\/wp-json\/wp\/v2\/posts\/313\/revisions"}],"predecessor-version":[{"id":324,"href":"https:\/\/zljlld.xyz\/index.php\/wp-json\/wp\/v2\/posts\/313\/revisions\/324"}],"wp:attachment":[{"href":"https:\/\/zljlld.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zljlld.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zljlld.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}