{"id":6345,"date":"2020-01-19T19:47:04","date_gmt":"2020-01-19T11:47:04","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=6345"},"modified":"2020-01-21T16:35:02","modified_gmt":"2020-01-21T08:35:02","slug":"git","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/git","title":{"rendered":"git\u547d\u4ee4 – \u7248\u672c\u63a7\u5236\u7cfb\u7edf"},"content":{"rendered":"\n

Git\u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u5206\u5e03\u5f0f\u7248\u672c\u63a7\u5236\u7cfb\u7edf\uff0c\u7528\u4e8e\u654f\u6377\u9ad8\u6548\u5730\u5904\u7406\u4efb\u4f55\u6216\u5c0f\u6216\u5927\u7684\u9879\u76ee\u3002<\/p>\n\n\n\n

Git\u662f Linus Torvalds \u4e3a\u4e86\u5e2e\u52a9\u7ba1\u7406 Linux \u5185\u6838\u5f00\u53d1\u800c\u5f00\u53d1\u7684\u4e00\u4e2a\u5f00\u653e\u6e90\u7801\u7684\u7248\u672c\u63a7\u5236\u8f6f\u4ef6;Git \u4e0e\u5e38\u7528\u7684\u7248\u672c\u63a7\u5236\u5de5\u5177 CVS, Subversion \u7b49\u4e0d\u540c\uff0c\u5b83\u91c7\u7528\u4e86\u5206\u5e03\u5f0f\u7248\u672c\u5e93\u7684\u65b9\u5f0f\uff0c\u4e0d\u5fc5\u670d\u52a1\u5668\u7aef\u8f6f\u4ef6\u652f\u6301\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>git [\u53c2\u6570]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

add<\/td>\u5c06\u6587\u4ef6\u5185\u5bb9\u6dfb\u52a0\u5230\u7d22\u5f15<\/td><\/tr>
init<\/td>\u521b\u5efa\u4e00\u4e2a\u7a7a\u7684Git\u5b58\u50a8\u5e93\u6216\u91cd\u65b0\u521d\u59cb\u5316\u4e00\u4e2a\u73b0\u6709\u7684\u5b58\u50a8\u5e93<\/td><\/tr>
rm<\/td>\u4ece\u5de5\u4f5c\u6811\u548c\u7d22\u5f15\u4e2d\u5220\u9664\u6587\u4ef6<\/td><\/tr>
clone<\/td>\u5c06\u5b58\u50a8\u5e93\u514b\u9686\u5230\u65b0\u76ee\u5f55\u4e2d<\/td><\/tr>
commit<\/td>\u8bb0\u5f55\u5bf9\u5b58\u50a8\u5e93\u7684\u66f4\u6539<\/td><\/tr>
pull<\/td>\u4ece\u53e6\u4e00\u4e2a\u5b58\u50a8\u5e93\u6216\u672c\u5730\u5206\u652f\u83b7\u53d6\u5e76\u4e0e\u4e4b\u5408\u5e76<\/td><\/tr>
push<\/td>\u66f4\u65b0\u8fdc\u7a0b\u5f15\u7528\u4ee5\u53ca\u5173\u8054\u7684\u5bf9\u8c61<\/td><\/tr>
status<\/td>\u663e\u793a\u5de5\u4f5c\u6811\u72b6\u6001<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u521b\u5efa\u7a7a\u7684\u5b58\u50a8\u5e93\u5e76\u521d\u59cb\u5316\u5b58\u50a8\u5e93\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# git init<\/pre>\n\n\n\n

\u5c06\u5b58\u50a8\u5e93\u514b\u9686\u5230\u65b0\u76ee\u5f55\u4e2d\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# git clone [url]<\/pre>\n\n\n\n

\u663e\u793a\u5de5\u4f5c\u6811\u72b6\u6001\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# git status<\/pre>\n\n\n\n

\u4ece\u5de5\u4f5c\u6811\u548c\u7d22\u5f15\u4e2d\u5220\u9664\u6587\u4ef6\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# git rm test.md<\/pre>\n\n\n\n

<\/p>\n","protected":false},"excerpt":{"rendered":"

Git\u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u5206\u5e03\u5f0f\u7248\u672c\u63a7\u5236\u7cfb\u7edf\uff0c\u7528\u4e8e\u654f\u6377\u9ad8\u6548\u5730\u5904\u7406\u4efb\u4f55\u6216\u5c0f\u6216\u5927\u7684\u9879\u76ee\u3002 Git\u662f Linus Torva […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6345"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=6345"}],"version-history":[{"count":4,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6345\/revisions"}],"predecessor-version":[{"id":6553,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6345\/revisions\/6553"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=6345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=6345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=6345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}