远程操作非常简便
- git clone
- git remote
- git fetch
- git pull
- git push

$ git clone <版本库的网址>
$ git clone https://github.com/jquery/jquery.git
$ 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进行远程仓库操作,包括clone、fetch、pull及push等常用命令,并列举了支持的不同协议及其示例。

被折叠的 条评论
为什么被折叠?



