git 命令
git config --global user.name "你的名字" git config --global user.email "你的Email" git clone 在git clone的时候,所有本地分支默认与远程主机的同名分支,建立追踪关系,也就是说,本地的master分支自动"追踪"origin/master分支。 1、从远程主机克隆一个版本库,到本地生成的同名目录 git clone <版本库的网址> 2、从远程主机克隆一个版本库,到本地指定的目录 git clone <版本库的网址> <本地目录名> 3、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 [user@]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]:/