git clone 是用来把远程仓库复制到本地的命令。基本用法如下:
git clone 仓库地址
例如:
git clone https://github.com/user/repo.git
执行后会在当前目录生成一个 repo 文件夹。
git clone 仓库地址 目录名
例如:
git clone https://github.com/user/repo.git my_project
git clone git@github.com:user/repo.git
需要先配置 SSH Key。
git clone -b 分支名 仓库地址
例如:
git clone -b dev https://github.com/user/repo.git
git clone --depth=1 仓库地址
https://github.com/user/repo.gitgit@github.com:user/repo.git如果你用的是 GitHub / GitLab / Gitee,或者遇到具体报错,可以把情况发给我,我帮你具体看。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。