{"id":24689,"date":"2023-09-18T18:06:06","date_gmt":"2023-09-18T10:06:06","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=24689"},"modified":"2023-09-18T18:06:06","modified_gmt":"2023-09-18T10:06:06","slug":"git-second%ef%bc%9abasic-git","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/git-second%ef%bc%9abasic-git.html","title":{"rendered":"Git \u7cfb\u5217\uff08\u4e8c\uff09\uff1a\u521d\u6b65\u4e86\u89e3 Git"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u7531\u4e8e Git \u5982\u6b64\u6d41\u884c\uff0c\u56e0\u800c\u5982\u679c\u4f60\u80fd\u591f\u81f3\u5c11\u719f\u6089\u4e00\u4e9b\u57fa\u7840\u7684 Git \u77e5\u8bc6\u4e5f\u80fd\u4e3a\u4f60\u7684\u751f\u6d3b\u5e26\u6765\u5f88\u591a\u4fbf\u6377\u3002\u5982\u679c\u4f60\u53ef\u4ee5\u638c\u63e1 Git \u57fa\u7840(\u4f60\u53ef\u4ee5\u7684\uff0c\u6211\u53d1\u8a93!)\uff0c\u90a3\u4e48\u4f60\u5c06\u80fd\u591f\u4e0b\u8f7d\u4efb\u4f55\u4f60\u9700\u8981\u7684\u4e1c\u897f\uff0c\u751a\u81f3\u8fd8\u53ef\u80fd\u505a\u4e00\u4e9b\u8d21\u732e\u4f5c\u4e3a\u56de\u9988\u3002\u6bd5\u7adf\uff0c\u90a3\u5c31\u662f\u5f00\u6e90\u7684\u7cbe\u9ad3\u6240\u5728\uff1a\u4f60\u62e5\u6709\u83b7\u53d6\u4f60\u4f7f\u7528\u7684\u8f6f\u4ef6\u4ee3\u7801\u7684\u6743\u5229\uff0c\u62e5\u6709\u548c\u4ed6\u4eba\u5206\u4eab\u7684\u81ea\u7531\uff0c\u4ee5\u53ca\u53ea\u8981\u4f60\u613f\u610f\u5c31\u53ef\u4ee5\u4fee\u6539\u5b83\u7684\u6743\u5229\u3002\u53ea\u8981\u4f60\u719f\u6089\u4e86 Git\uff0c\u5b83\u5c31\u53ef\u4ee5\u8ba9\u8fd9\u4e00\u5207\u90fd\u53d8\u5f97\u5f88\u5bb9\u6613\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"Git<\/p>\n

\u8bfb\u548c\u5199<\/strong><\/span><\/div>\n

\u4e00\u822c\u6765\u8bf4\uff0c\u6709\u4e24\u79cd\u65b9\u6cd5\u53ef\u4ee5\u548c Git \u4ed3\u5e93\u4ea4\u4e92\uff1a\u4f60\u53ef\u4ee5\u4ece\u4ed3\u5e93\u4e2d\u8bfb\u53d6\uff0c\u6216\u8005\u4f60\u4e5f\u80fd\u591f\u5411\u4ed3\u5e93\u4e2d\u5199\u5165\u3002\u5b83\u5c31\u50cf\u4e00\u4e2a\u6587\u4ef6\uff1a\u6709\u65f6\u5019\u4f60\u6253\u5f00\u4e00\u4e2a\u6587\u6863\u53ea\u662f\u4e3a\u4e86\u9605\u8bfb\u5b83\uff0c\u800c\u5176\u5b83\u65f6\u5019\u4f60\u6253\u5f00\u6587\u6863\u662f\u56e0\u4e3a\u4f60\u9700\u8981\u505a\u4e9b\u6539\u52a8\u3002
\n\u672c\u6587\u4ec5\u8bb2\u89e3\u5982\u4f55\u4ece Git \u4ed3\u5e93\u8bfb\u53d6\u3002\u6211\u4eec\u5c06\u4f1a\u5728\u540e\u9762\u7684\u4e00\u7bc7\u6587\u7ae0\u4e2d\u8bb2\u89e3\u5982\u4f55\u5411 Git \u4ed3\u5e93\u5199\u56de\u7684\u4e3b\u9898\u3002<\/p>\n

Git\u8fd8\u662fGitHub<\/strong><\/span><\/div>\n

\u4e00\u53e5\u8bdd\u6f84\u6e05\uff1aGit \u4e0d\u540c\u4e8e GitHub(\u6216 GitLab\uff0c\u6216 Bitbucket)\u3002Git \u662f\u4e00\u4e2a\u547d\u4ee4\u884c\u7a0b\u5e8f\uff0c\u6240\u4ee5\u5b83\u5c31\u50cf\u4e0b\u9762\u8fd9\u6837\uff1a<\/p>\n

    \n
  1. $\u00a0git<\/li>\n
  2. usage:\u00a0Git\u00a0[--version]\u00a0[--help]\u00a0[-C\u00a0<path>]<\/li>\n
  3. \u00a0\u00a0[-p\u00a0|\u00a0--paginate\u00a0|\u00a0--no-pager]\u00a0[--bare]<\/li>\n
  4. \u00a0\u00a0[--Git-dir=<path>]\u00a0<command>\u00a0[<args>]<\/li>\n<\/ol>\n

    \u7531\u4e8e Git \u662f\u5f00\u6e90\u7684\uff0c\u6240\u4ee5\u5c31\u6709\u8bb8\u591a\u806a\u660e\u4eba\u56f4\u7ed5\u5b83\u6784\u5efa\u4e86\u57fa\u7840\u8f6f\u4ef6;\u8fd9\u4e9b\u57fa\u7840\u8f6f\u4ef6\uff0c\u5305\u62ec\u5728\u4ed6\u4eec\u81ea\u5df1\u8eab\u8fb9\uff0c\u90fd\u5df2\u7ecf\u53d8\u5f97\u975e\u5e38\u6d41\u884c\u4e86\u3002
    \n\u6211\u7684\u6587\u7ae0\u7cfb\u5217\u5c06\u9996\u5148\u6559\u4f60\u7eaf\u7cb9\u7684 Git \u77e5\u8bc6\uff0c\u56e0\u4e3a\u4e00\u65e6\u4f60\u7406\u89e3\u4e86 Git \u5728\u505a\u4ec0\u4e48\uff0c\u90a3\u4e48\u4f60\u5c31\u65e0\u9700\u5173\u5fc3\u6b63\u5728\u4f7f\u7528\u7684\u524d\u7aef\u5de5\u5177\u662f\u4ec0\u4e48\u4e86\u3002\u7136\u800c\uff0c\u6211\u7684\u6587\u7ae0\u7cfb\u5217\u4e5f\u5c06\u6db5\u76d6\u901a\u8fc7\u6d41\u884c\u7684 Git \u670d\u52a1\u5b8c\u6210\u6bcf\u9879\u4efb\u52a1\u7684\u5e38\u7528\u65b9\u6cd5\uff0c\u56e0\u4e3a\u90a3\u4e9b\u5c06\u53ef\u80fd\u662f\u4f60\u9996\u5148\u4f1a\u9047\u5230\u7684\u3002<\/p>\n

    \u5b89\u88c5 Git<\/strong><\/span><\/div>\n

    \u5728 Linux \u7cfb\u7edf\u4e0a\uff0c\u4f60\u53ef\u4ee5\u4ece\u6240\u4f7f\u7528\u7684\u53d1\u884c\u7248\u8f6f\u4ef6\u4ed3\u5e93\u4e2d\u83b7\u53d6\u5e76\u5b89\u88c5 Git\u3002BSD \u7528\u6237\u5e94\u5f53\u5728 Ports \u6811\u7684 devel \u90e8\u5206\u67e5\u627e Git\u3002
    \n\u5bf9\u4e8e\u95ed\u6e90\u7684\u64cd\u4f5c\u7cfb\u7edf\uff0c\u8bf7\u524d\u5f80\u5176\u9879\u76ee\u5b98\u7f51\uff0c\u5e76\u6839\u636e\u8bf4\u660e\u5b89\u88c5\u3002\u4e00\u65e6\u5b89\u88c5\u540e\uff0c\u5728 Linux\u3001BSD \u548c Mac OS X \u4e0a\u7684\u547d\u4ee4\u5e94\u5f53\u6ca1\u6709\u4efb\u4f55\u5dee\u522b\u3002Windows \u7528\u6237\u9700\u8981\u8c03\u6574 Git \u547d\u4ee4\uff0c\u4ece\u800c\u548c Windows \u6587\u4ef6\u7cfb\u7edf\u76f8\u5339\u914d\uff0c\u6216\u8005\u5b89\u88c5 Cygwin \u4ee5\u539f\u751f\u7684\u65b9\u5f0f\u8fd0\u884c Git\uff0c\u800c\u4e0d\u53d7 Windows \u6587\u4ef6\u7cfb\u7edf\u8f6c\u6362\u95ee\u9898\u7684\u7f81\u7eca\u3002<\/p>\n

    Git \u4e0b\u5348\u8336<\/strong><\/span><\/div>\n

    \u5e76\u975e\u6bcf\u4e2a\u4eba\u90fd\u9700\u8981\u7acb\u523b\u5c06 Git \u52a0\u5165\u5230\u6211\u4eec\u7684\u65e5\u5e38\u751f\u6d3b\u4e2d\u3002\u6709\u4e9b\u65f6\u5019\uff0c\u4f60\u548c Git \u6700\u591a\u7684\u4ea4\u4e92\u5c31\u662f\u8bbf\u95ee\u4e00\u4e2a\u4ee3\u7801\u5e93\uff0c\u4e0b\u8f7d\u4e00\u4e24\u4e2a\u6587\u4ef6\uff0c\u7136\u540e\u5c31\u4e0d\u7528\u5b83\u4e86\u3002\u4ee5\u8fd9\u6837\u7684\u65b9\u5f0f\u770b\u5f85 Git\uff0c\u5b83\u66f4\u50cf\u662f\u4e0b\u5348\u8336\u800c\u975e\u4e00\u6b21\u6b63\u5f0f\u7684\u5bb4\u4f1a\u3002\u4f60\u8fdb\u884c\u4e00\u4e9b\u793c\u8282\u6027\u7684\u4ea4\u8c08\uff0c\u83b7\u5f97\u4e86\u9700\u8981\u7684\u4fe1\u606f\uff0c\u7136\u540e\u4f60\u5c31\u4f1a\u79bb\u5f00\uff0c\u81f3\u5c11\u63a5\u4e0b\u6765\u7684\u4e09\u4e2a\u6708\u4f60\u4e0d\u518d\u60f3\u8fd9\u6837\u8bf4\u8bdd\u3002
    \n\u5f53\u7136\uff0c\u90a3\u662f\u53ef\u4ee5\u7684\u3002
    \n\u4e00\u822c\u6765\u8bf4\uff0c\u6709\u4e24\u79cd\u65b9\u6cd5\u8bbf\u95ee Git\uff1a\u4f7f\u7528\u547d\u4ee4\u884c\uff0c\u6216\u8005\u4f7f\u7528\u4e00\u79cd\u795e\u5947\u7684\u56e0\u7279\u7f51\u6280\u672f\u901a\u8fc7 web \u6d4f\u89c8\u5668\u5feb\u901f\u8f7b\u677e\u5730\u8bbf\u95ee\u3002
    \n\u5047\u8bbe\u4f60\u60f3\u8981\u7ed9\u7ec8\u7aef\u5b89\u88c5\u4e00\u4e2a\u56de\u6536\u7ad9\uff0c\u56e0\u4e3a\u4f60\u5df2\u7ecf\u88ab rm \u547d\u4ee4\u6bc1\u6389\u592a\u591a\u6b21\u4e86\u3002\u4f60\u53ef\u80fd\u542c\u8bf4\u8fc7 Trashy \uff0c\u5b83\u79f0\u81ea\u5df1\u4e3a\u300c\u7406\u667a\u7684 rm \u547d\u4ee4\u4e2d\u95f4\u4eba\u300d\uff0c\u4e5f\u8bb8\u4f60\u60f3\u5728\u5b89\u88c5\u5b83\u4e4b\u524d\u9605\u8bfb\u5b83\u7684\u6587\u6863\u3002\u5e78\u8fd0\u7684\u662f\uff0cTrashy \u516c\u5f00\u5730\u6258\u7ba1\u5728 GitLab.com\u3002<\/p>\n

    Landgrab<\/strong><\/span><\/div>\n

    \u6211\u4eec\u5de5\u4f5c\u7684\u7b2c\u4e00\u6b65\u662f\u5bf9\u8fd9\u4e2a Git \u4ed3\u5e93\u4f7f\u7528 landgrab \u6392\u5e8f\u65b9\u6cd5\uff1a\u6211\u4eec\u4f1a\u514b\u9686\u8fd9\u4e2a\u5b8c\u6574\u7684\u4ed3\u5e93\uff0c\u7136\u540e\u4f1a\u6839\u636e\u5185\u5bb9\u6392\u5e8f\u3002\u7531\u4e8e\u8be5\u4ed3\u5e93\u662f\u6258\u7ba1\u5728\u516c\u5171\u7684 Git \u670d\u52a1\u5e73\u53f0\u4e0a\uff0c\u6240\u4ee5\u6709\u4e24\u79cd\u65b9\u5f0f\u6765\u5b8c\u6210\u5de5\u4f5c\uff1a\u4f7f\u7528\u547d\u4ee4\u884c\uff0c\u6216\u8005\u4f7f\u7528 web \u754c\u9762\u3002
    \n\u8981\u60f3\u4f7f\u7528 Git \u83b7\u53d6\u6574\u4e2a\u4ed3\u5e93\uff0c\u5c31\u8981\u4f7f\u7528 git clone \u547d\u4ee4\u548c Git \u4ed3\u5e93\u7684 URL \u4f5c\u4e3a\u53c2\u6570\u3002\u5982\u679c\u4f60\u4e0d\u6e05\u695a\u6b63\u786e\u7684 URL \u662f\u4ec0\u4e48\uff0c\u4ed3\u5e93\u5e94\u8be5\u4f1a\u544a\u8bc9\u4f60\u7684\u3002GitLab \u4e3a\u4f60\u63d0\u4f9b\u4e86 Trashy \u4ed3\u5e93\u7684\u7528\u4e8e\u62f7\u8d1d\u7c98\u8d34\u7684 URL\u3002<\/p>\n

    \"Git<\/center>\u4f60\u4e5f\u8bb8\u6ce8\u610f\u5230\u4e86\uff0c\u5728\u67d0\u4e9b\u670d\u52a1\u5e73\u53f0\u4e0a\uff0c\u4f1a\u540c\u65f6\u63d0\u4f9b SSH \u548c HTTPS \u94fe\u63a5\u3002\u53ea\u6709\u5f53\u4f60\u62e5\u6709\u4ed3\u5e93\u7684\u5199\u6743\u9650\u65f6\uff0c\u4f60\u624d\u53ef\u4ee5\u4f7f\u7528 SSH\u3002\u5426\u5219\u7684\u8bdd\uff0c\u4f60\u5fc5\u987b\u4f7f\u7528 HTTPS URL\u3002
    \n\u4e00\u65e6\u4f60\u83b7\u5f97\u4e86\u6b63\u786e\u7684 URL\uff0c\u514b\u9686\u4ed3\u5e93\u662f\u975e\u5e38\u5bb9\u6613\u7684\u3002\u5c31\u662f git clone \u8be5 URL \u5373\u53ef\uff0c\u4ee5\u53ca\u4e00\u4e2a\u53ef\u9009\u7684\u6307\u5b9a\u8981\u514b\u9686\u5230\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u4f1a\u5c06 git \u76ee\u5f55\u514b\u9686\u5230\u4f60\u5f53\u524d\u6240\u5728\u7684\u76ee\u5f55;\u4f8b\u5982\uff0c'trashy.git' \u5c06\u4f1a\u514b\u9686\u5230\u4f60\u5f53\u524d\u4f4d\u7f6e\u7684 'trashy' \u76ee\u5f55\u3002\u6211\u4f7f\u7528 .clone \u6269\u5c55\u540d\u6807\u8bb0\u90a3\u4e9b\u53ea\u8bfb\u7684\u4ed3\u5e93\uff0c\u800c\u4f7f\u7528 .git \u6269\u5c55\u540d\u6807\u8bb0\u90a3\u4e9b\u6211\u53ef\u4ee5\u8bfb\u5199\u7684\u4ed3\u5e93\uff0c\u4e0d\u8fc7\u8fd9\u5e76\u4e0d\u662f\u5b98\u65b9\u8981\u6c42\u7684\u3002<\/p>\n
      \n
    1. $\u00a0git\u00a0clone\u00a0https:\/\/gitlab.com\/trashy\/trashy.git\u00a0trashy.clone<\/li>\n
    2. Cloning\u00a0into\u00a0'trashy.clone'...<\/li>\n
    3. remote:\u00a0Counting\u00a0objects:\u00a0142,\u00a0done.<\/li>\n
    4. remote:\u00a0Compressing\u00a0objects:\u00a0100%\u00a0(91\/91),\u00a0done.<\/li>\n
    5. remote:\u00a0Total\u00a0142\u00a0(delta\u00a070),\u00a0reused\u00a0103\u00a0(delta\u00a047)<\/li>\n
    6. Receiving\u00a0objects:\u00a0100%\u00a0(142\/142),\u00a025.99\u00a0KiB\u00a0|\u00a00\u00a0bytes\/s,\u00a0done.<\/li>\n
    7. Resolving\u00a0deltas:\u00a0100%\u00a0(70\/70),\u00a0done.<\/li>\n
    8. Checking\u00a0connectivity...\u00a0done.<\/li>\n<\/ol>\n

      \u4e00\u65e6\u6210\u529f\u5730\u514b\u9686\u4e86\u4ed3\u5e93\uff0c\u4f60\u5c31\u53ef\u4ee5\u50cf\u5bf9\u5f85\u4f60\u7535\u8111\u4e0a\u4efb\u4f55\u5176\u5b83\u76ee\u5f55\u90a3\u6837\u6d4f\u89c8\u4ed3\u5e93\u4e2d\u7684\u6587\u4ef6\u3002<\/p>\n

      \u53e6\u5916\u4e00\u79cd\u83b7\u5f97\u4ed3\u5e93\u62f7\u8d1d\u7684\u65b9\u5f0f\u662f\u4f7f\u7528 web \u754c\u9762\u3002GitLab \u548c GitHub \u90fd\u4f1a\u63d0\u4f9b\u4e00\u4e2a .zip \u683c\u5f0f\u7684\u4ed3\u5e93\u5feb\u7167\u6587\u4ef6\u3002GitHub \u6709\u4e00\u4e2a\u5927\u5927\u7684\u7eff\u8272\u4e0b\u8f7d\u6309\u94ae\uff0c\u4f46\u662f\u5728 GitLab \u4e2d\uff0c\u53ef\u4ee5\u5728\u6d4f\u89c8\u5668\u7684\u53f3\u4fa7\u627e\u5230\u5e76\u4e0d\u663e\u773c\u7684\u4e0b\u8f7d\u6309\u94ae\u3002<\/p>\n

      <\/center>\"Git<\/p>\n
      \u4ed4\u7ec6\u6311\u9009<\/strong><\/span><\/div>\n

      \u53e6\u5916\u4e00\u79cd\u4ece Git \u4ed3\u5e93\u4e2d\u83b7\u53d6\u6587\u4ef6\u7684\u65b9\u6cd5\u662f\u627e\u5230\u4f60\u60f3\u8981\u7684\u6587\u4ef6\uff0c\u7136\u540e\u628a\u5b83\u4ece\u4ed3\u5e93\u4e2d\u62fd\u51fa\u6765\u3002\u53ea\u6709 web \u754c\u9762\u624d\u63d0\u4f9b\u8fd9\u79cd\u65b9\u6cd5\uff0c\u672c\u8d28\u4e0a\u6765\u8bf4\uff0c\u4f60\u770b\u5230\u7684\u662f\u522b\u4eba\u7684\u4ed3\u5e93\u514b\u9686;\u4f60\u53ef\u4ee5\u628a\u5b83\u60f3\u8c61\u6210\u4e00\u4e2a HTTP \u5171\u4eab\u76ee\u5f55\u3002
      \n\u4f7f\u7528\u8fd9\u79cd\u65b9\u6cd5\u7684\u95ee\u9898\u662f\uff0c\u4f60\u4e5f\u8bb8\u4f1a\u53d1\u73b0\u67d0\u4e9b\u6587\u4ef6\u5e76\u4e0d\u5b58\u5728\u4e8e\u539f\u59cb\u4ed3\u5e93\u4e2d\uff0c\u56e0\u4e3a\u5b8c\u6574\u5f62\u5f0f\u7684\u6587\u4ef6\u53ef\u80fd\u53ea\u6709\u5728\u6267\u884c make \u547d\u4ee4\u540e\u624d\u80fd\u6784\u5efa\uff0c\u90a3\u53ea\u6709\u4f60\u4e0b\u8f7d\u4e86\u5b8c\u6574\u7684\u4ed3\u5e93\uff0c\u9605\u8bfb\u4e86 README \u6216\u8005 INSTALL \u6587\u4ef6\uff0c\u7136\u540e\u8fd0\u884c\u76f8\u5173\u547d\u4ee4\u4e4b\u540e\u624d\u4f1a\u4ea7\u751f\u3002\u4e0d\u8fc7\uff0c\u5047\u5982\u4f60\u786e\u4fe1\u6587\u4ef6\u5b58\u5728\uff0c\u800c\u4f60\u53ea\u60f3\u8fdb\u5165\u4ed3\u5e93\uff0c\u83b7\u53d6\u90a3\u4e2a\u6587\u4ef6\uff0c\u7136\u540e\u79bb\u5f00\u7684\u8bdd\uff0c\u4f60\u5c31\u53ef\u4ee5\u90a3\u6837\u505a\u3002
      \n\u5728 GitLab \u548c GitHub \u4e2d\uff0c\u5355\u51fb\u6587\u4ef6\u94fe\u63a5\uff0c\u5e76\u5728 Raw \u6a21\u5f0f\u4e0b\u67e5\u770b\uff0c\u7136\u540e\u4f7f\u7528\u4f60\u7684 web \u6d4f\u89c8\u5668\u7684\u4fdd\u5b58\u529f\u80fd\uff0c\u4f8b\u5982\uff1a\u5728 Firefox \u4e2d\uff0c\u201c\u6587\u4ef6\u201d > \u201c\u4fdd\u5b58\u9875\u9762\u4e3a\u201d\u3002\u5728\u4e00\u4e2a GitWeb \u4ed3\u5e93\u4e2d(\u8fd9\u662f\u4e00\u4e2a\u67d0\u4e9b\u66f4\u559c\u6b22\u81ea\u5df1\u6258\u7ba1 git \u7684\u4eba\u4f7f\u7528\u7684\u79c1\u6709 git \u4ed3\u5e93 web \u67e5\u770b\u5668)\uff0cRaw \u67e5\u770b\u94fe\u63a5\u5728\u6587\u4ef6\u5217\u8868\u89c6\u56fe\u4e2d\u3002<\/p>\n

      \"Git<\/p>\n

      \u6700\u4f73\u5b9e\u8df5<\/strong><\/span><\/div>\n

      \u901a\u5e38\u8ba4\u4e3a\uff0c\u548c Git \u4ea4\u4e92\u7684\u6b63\u786e\u65b9\u5f0f\u662f\u514b\u9686\u5b8c\u6574\u7684 Git \u4ed3\u5e93\u3002\u8fd9\u6837\u8ba4\u4e3a\u662f\u6709\u51e0\u4e2a\u539f\u56e0\u7684\u3002\u9996\u5148\uff0c\u53ef\u4ee5\u4f7f\u7528 git pull \u547d\u4ee4\u8f7b\u677e\u5730\u4f7f\u514b\u9686\u4ed3\u5e93\u4fdd\u6301\u66f4\u65b0\uff0c\u8fd9\u6837\u4f60\u5c31\u4e0d\u5fc5\u5728\u6bcf\u6b21\u6587\u4ef6\u6539\u53d8\u65f6\u5c31\u91cd\u56de web \u7ad9\u70b9\u83b7\u5f97\u4e00\u4efd\u5168\u65b0\u7684\u62f7\u8d1d\u3002\u7b2c\u4e8c\uff0c\u4f60\u78b0\u5de7\u9700\u8981\u505a\u4e9b\u6539\u8fdb\uff0c\u53ea\u8981\u4fdd\u6301\u4ed3\u5e93\u6574\u6d01\uff0c\u90a3\u4e48\u4f60\u53ef\u4ee5\u975e\u5e38\u8f7b\u677e\u5730\u5411\u539f\u6765\u7684\u4f5c\u8005\u63d0\u4ea4\u6240\u505a\u7684\u53d8\u66f4\u3002
      \n\u73b0\u5728\uff0c\u53ef\u80fd\u662f\u65f6\u5019\u7ec3\u4e60\u67e5\u627e\u611f\u5174\u8da3\u7684 Git \u4ed3\u5e93\uff0c\u7136\u540e\u5c06\u5b83\u4eec\u514b\u9686\u5230\u4f60\u7684\u786c\u76d8\u4e2d\u4e86\u3002\u53ea\u8981\u4f60\u4e86\u89e3\u4f7f\u7528\u7ec8\u7aef\u7684\u57fa\u7840\u77e5\u8bc6\uff0c\u90a3\u5c31\u4e0d\u4f1a\u592a\u96be\u505a\u5230\u3002\u8fd8\u4e0d\u77e5\u9053\u57fa\u672c\u7684\u7ec8\u7aef\u4f7f\u7528\u65b9\u5f0f\u5417?\u90a3\u518d\u7ed9\u591a\u6211 5 \u5206\u949f\u65f6\u95f4\u5427\u3002<\/p>\n

      \u7ec8\u7aef\u4f7f\u7528<\/strong><\/span><\/div>\n

      \u9996\u5148\u8981\u77e5\u9053\u7684\u662f\uff0c\u6240\u6709\u7684\u6587\u4ef6\u90fd\u6709\u4e00\u4e2a\u8def\u5f84\u3002\u8fd9\u662f\u6709\u9053\u7406\u7684;\u5982\u679c\u6211\u8ba9\u4f60\u5728\u5e38\u89c4\u7684\u975e\u7ec8\u7aef\u73af\u5883\u4e0b\u4e3a\u6211\u6253\u5f00\u4e00\u4e2a\u6587\u4ef6\uff0c\u4f60\u5c31\u8981\u5bfc\u822a\u5230\u6587\u4ef6\u5728\u4f60\u786c\u76d8\u7684\u4f4d\u7f6e\uff0c\u5e76\u4e14\u76f4\u5230\u4f60\u627e\u5230\u90a3\u4e2a\u6587\u4ef6\uff0c\u4f60\u8981\u6d4f\u89c8\u4e00\u5927\u5806\u7a97\u53e3\u3002\u4f8b\u5982\uff0c\u4f60\u4e5f\u8bb8\u8981\u70b9\u51fb\u4f60\u7684\u5bb6\u76ee\u5f55 > \u56fe\u7247 > InktoberSketches > monkey.kra\u3002
      \n\u5728\u90a3\u6837\u7684\u573a\u666f\u4e0b\uff0c\u6587\u4ef6 monkeysketch.kra \u7684\u8def\u5f84\u662f\uff1a$HOME\/\u56fe\u7247\/InktoberSketches\/monkey.kra\u3002
      \n\u5728\u7ec8\u7aef\u4e2d\uff0c\u9664\u975e\u4f60\u6b63\u5728\u5904\u7406\u4e00\u4e9b\u7279\u6b8a\u7684\u7cfb\u7edf\u7ba1\u7406\u5458\u4efb\u52a1\uff0c\u4f60\u7684\u6587\u4ef6\u8def\u5f84\u901a\u5e38\u662f\u4ee5 $HOME \u5f00\u5934\u7684(\u6216\u8005\uff0c\u5982\u679c\u4f60\u5f88\u61d2\uff0c\u5c31\u4f7f\u7528 ~ \u5b57\u7b26)\uff0c\u540e\u9762\u7d27\u8ddf\u7740\u4e00\u4e9b\u5217\u7684\u6587\u4ef6\u5939\u76f4\u5230\u6587\u4ef6\u540d\u81ea\u8eab\u3002
      \n\u8fd9\u5c31\u548c\u4f60\u5728 GUI \u4e2d\u70b9\u51fb\u5404\u79cd\u56fe\u6807\u76f4\u5230\u627e\u5230\u76f8\u5173\u7684\u6587\u4ef6\u6216\u6587\u4ef6\u5939\u7c7b\u4f3c\u3002
      \n\u5982\u679c\u4f60\u60f3\u628a Git \u4ed3\u5e93\u514b\u9686\u5230\u4f60\u7684\u6587\u6863\u76ee\u5f55\uff0c\u90a3\u4e48\u4f60\u53ef\u4ee5\u6253\u5f00\u4e00\u4e2a\u7ec8\u7aef\u7136\u540e\u8fd0\u884c\u4e0b\u9762\u7684\u547d\u4ee4\uff1a<\/p>\n

        \n
      1. $\u00a0git\u00a0clone\u00a0https:\/\/gitlab.com\/foo\/bar.git<\/li>\n
      2. $HOME\/\u6587\u6863\/bar.clone<\/li>\n<\/ol>\n

        \u4e00\u65e6\u514b\u9686\u5b8c\u6210\uff0c\u4f60\u53ef\u4ee5\u6253\u5f00\u4e00\u4e2a\u6587\u4ef6\u7ba1\u7406\u5668\u7a97\u53e3\uff0c\u5bfc\u822a\u5230\u4f60\u7684\u6587\u6863\u6587\u4ef6\u5939\uff0c\u7136\u540e\u4f60\u5c31\u4f1a\u53d1\u73b0 bar.clone \u76ee\u5f55\u6b63\u5728\u7b49\u5f85\u7740\u4f60\u8bbf\u95ee\u3002
        \n\u5982\u679c\u4f60\u60f3\u8981\u66f4\u9ad8\u7ea7\u70b9\uff0c\u4f60\u6216\u8bb8\u4f1a\u5728\u4ee5\u540e\u518d\u6b21\u8bbf\u95ee\u90a3\u4e2a\u4ed3\u5e93\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528 git pull \u547d\u4ee4\u6765\u67e5\u770b\u9879\u76ee\u6709\u6ca1\u6709\u66f4\u65b0\uff1a<\/p>\n

          \n
        1. $\u00a0cd\u00a0$HOME\/\u6587\u6863\/bar.clone<\/li>\n
        2. $\u00a0pwd<\/li>\n
        3. bar.clone<\/li>\n
        4. $\u00a0git\u00a0pull<\/li>\n<\/ol>\n

          \u5230\u76ee\u524d\u4e3a\u6b62\uff0c\u4f60\u9700\u8981\u521d\u6b65\u4e86\u89e3\u7684\u6240\u6709\u7ec8\u7aef\u547d\u4ee4\u5c31\u662f\u90a3\u4e9b\u4e86\uff0c\u90a3\u5c31\u53bb\u63a2\u7d22\u5427\u3002\u4f60\u5b9e\u8df5\u5f97\u8d8a\u591a\uff0cGit \u638c\u63e1\u5f97\u5c31\u8d8a\u597d(\u719f\u80fd\u751f\u5de7)\uff0c\u8fd9\u662f\u91cd\u70b9\uff0c\u4e5f\u662f\u4e8b\u60c5\u7684\u672c\u8d28\u3002<\/p>\n

          \n

          \u539f\u6587\u6765\u81ea\uff1ahttp:\/\/os.51cto.com\/art\/201608\/515523.htm<\/a><\/p>\n

          \u672c\u6587\u5730\u5740\uff1ahttp:\/\/lrxjmw.cn\/git-second\uff1abasic-git.html<\/a>\u7f16\u8f91\u5458\uff1a\u5218\u5cf0\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

          \u5728\u8fd9\u4e2a\u7cfb\u5217\u7684\u4ecb\u7ecd\u7bc7\u4e2d\uff0c\u6211\u4eec\u5b66\u4e60\u5230\u4e86\u8c01\u5e94\u8be5\u4f7f\u7528 Git\uff0c\u4ee5\u53ca Git \u662f\u7528\u6765\u505a\u4ec0\u4e48\u7684\u3002\u4eca\u5929\uff0c\u6211\u4eec\u5c06\u5b66\u4e60\u5982\u4f55\u514b\u9686\u516c\u5171 Git \u4ed3\u5e93\uff0c\u4ee5\u53ca\u5982\u4f55\u63d0\u53d6\u51fa\u72ec\u7acb\u7684\u6587\u4ef6\u800c\u4e0d\u7528\u514b\u9686\u6574\u4e2a\u4ed3\u5e93\u3002<\/p>\n","protected":false},"author":116,"featured_media":25354,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-24689","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/24689","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/116"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=24689"}],"version-history":[{"count":6,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/24689\/revisions"}],"predecessor-version":[{"id":78337,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/24689\/revisions\/78337"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/25354"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=24689"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=24689"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=24689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}