码迷,mamicode.com
首页 > 其他好文 > 详细

一、git clone

时间:2017-09-16 15:01:40      阅读:238      评论:0      收藏:0      [点我收藏+]

标签:用户认证   ssh   参数   clone   repo   下载速度   远程   project   one   

一、git clone

$ git clone <版本库的网址> //该命令会在本地主机生成一个目录,与远程主机的版本库同名
$ git clone <版本库的网址> <本地目录名> //要指定不同的目录名,可以将目录名作为git clone命令的第二个参数

  git clone支持多种协议,除了HTTP(s)以外,还支持SSH、Git、本地文件协议

$ git clone http[s]://example.com/path/to/repo.git/
$ git clone ssh://example.com/path/to/repo.git/
$ git clone git://example.com/path/to/repo.git/
$ git clone /opt/git/project.git 
$ git clone file:///opt/git/project.git
$ git clone ftp[s]://example.com/path/to/repo.git/
$ git clone rsync://example.com/path/to/repo.git/

  SSH协议还有另一种写法

$ git clone [user@]example.com:path/to/repo.git/        //通常来说,Git协议下载速度最快,SSH协议用于需要用户认证的场合。各种协议优劣的详细讨论请参考官方文档

  

一、git clone

标签:用户认证   ssh   参数   clone   repo   下载速度   远程   project   one   

原文地址:http://www.cnblogs.com/jkr666666/p/7531138.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!