| 用途 | 从远端获取完整仓库 |
|---|---|
| 语法 | git clone [选项] <URL> [目录] |
| URL 形式 | https://、git@ssh、本地路径均可 |
常用示例
常用示例
git clone https://github.com/org/repo.git
git clone git@github.com:org/repo.git mydir
git clone -b release/2.x https://example.com/org/repo.git
git clone --recurse-submodules https://example.com/org/repo.gitclone 默认只是取回全部提交历史的一次性操作;后续同步用 git pull / fetch,不必重复克隆。