git-clone命令,主要负责克隆git仓库到另一个新目录中。
我们可以用如下的表示法来定义远程的一个git仓库:
rsync://host.xz/path/to/repo.git/
http://host.xz/path/to/repo.git/
https://host.xz/path/to/repo.git/
git://host.xz/path/to/repo.git/
git://host.xz/~user/path/to/repo.git/
ssh://[user@]host.xz[:port]/path/to/repo.git/
ssh://[user@]host.xz/path/to/repo.git/
ssh://[user@]host.xz/~user/path/to/repo.git/
ssh://[user@]host.xz/~/path/to/repo.git
如果git仓库在本地,那么可以这样表示:
/path/to/repo.git/
file:///path/to/repo.git/
转载请注明:Git中国 » 【看日记学Git】之十五