Git - git clone - 将远端仓库克隆拷贝到本地
索引:
参看代码 GitHub:
一、示例:
1 git clone https://github.com/liumeng0403/lm.solution.git
二、说明:
1.”clone” 部分
该部分指明是对远端已存在仓库的克隆动作,远端仓库被克隆到本地后,在本地就是一个git仓库,
并且这个git仓库自动默认追踪克隆过来的远端仓库,如 local:dev–>remote:dev、local:master–>remote:master 等等。
2.”https://github.com/liumeng0403/lm.solution.git” 部分
这部分是远端仓库的地址(URI) ,可根据实际情况替换为自己项目的远端仓库地址。
3.语法
git clone [–template=<template_directory>]
[-l]
[-s]
[–no-hardlinks]
[-q]
[-n]
[–bare]
[–mirror]
[-o <name>]
[-b <name>]
[-u <upload-pack>]
[–reference <repository>]
[–separate-git-dir <git dir>]
[–depth <depth>]
[–[no-]single-branch]
[–recursive|–recurse-submodules]
[–]
<repository>
[<directory>]
上面是一个完整的 git clone 语法语句,只有 “<repository>” 项部分是必须项,语法较为简单,可自行谷歌查看每项具体含义。
蒙
2018-06-09 00:22 周六