## 參考資料:
* [git clone官方API](https://git-scm.com/docs/git-clone)
## 實踐總結:
* git clone 加參數可下載指定分支代碼、指定目錄等;
* git clone 需要注意的是使用HTTP、HTTPS、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/
```
* 常用的有HTTP 和 SSH協議,建議SSH協議,因為使用 HTTP方式,每次提交代碼都得輸入用戶賬號密碼,會相當麻煩;
* [SSH 協議配置教程](https://git-scm.com/book/zh/ch4-3.html)
## git clone 常用指令:
* git clone git@github.com:wteam-xq/testGit.git
* 如果電腦沒配置SSH, 則需輸入git hub賬號密碼;
* 配置SSH后以后 使用`git push`指令不用輸入賬號密碼;
* git clone https://github.com/wteam-xq/testGit.git
* 此方式拷貝項目不需密碼;
* 但以后使用`git pull` 、`git push`指令都得輸入賬號密碼;
## 相關指令:
* [git SSH配置](http://www.hmoore.net/wteamxq/git_rank/277342) 配置git SSH: 別嫌麻煩, 配置了我接下來的工作會更輕松!