## 參考資料:
* [git config官方API](https://git-scm.com/docs/git-config)
* [git config命令使用-joey](http://blog.csdn.net/zxncvb/article/details/22153019)
## 實踐總結:
* config 后參數: `--local` `--global` `--system`
* `—-local` 當前工程對應的配置文件(倉庫級config)
* `—-global` 當前git用戶的配置文件(全局級config)
* `—-system` git安裝目錄下的配置文件(系統級config)
## git config 常用指令:
* git config --global user.name “wteamxq”
* 設置本地git的用戶名(不加最后的名字參數,則為查看本地git用戶名)
* git config --global user.email 857609086@qq.com
* 設置本地git的郵箱(不加最后郵箱參數,則為查看本地git郵箱)
* git config --list
* `--list`(可簡寫 -l)顯示git相關信息(包括本地姓名、本地郵箱、所連接的遠程地址等)
* git config —global -e
* 直接編輯 配置文件文本;
* git config --global alias.co checkout
* git config --global alias.br branch
* git config --global alias.ci commit
* git config --global alias.st status
* 設置Git別名(快捷指令)
* git config --global credential.helper store
* 如果使用 HTTP 協議方式,每次提交代碼都需要密碼很麻煩, 可以配置免密:
* 1)新建文件并保存密碼
```bash
$ touch ~/.git-credentials
$ vim ~/.git-credentials
```
* 2)添加內容
```bash
https://{username}:{passwd}@github.com
```
* 3)添加git配置
```bash
$ git config --global credential.helper store
```
* [官方:Git 工具 - 憑證存儲](https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage)
* [官方:Git 工具 - 憑證存儲-中文](https://git-scm.com/book/zh/v2/Git-%E5%B7%A5%E5%85%B7-%E5%87%AD%E8%AF%81%E5%AD%98%E5%82%A8)
## 相關指令:
* [git remote](https://github.com/wteam-xq/testGit/blob/master/learn_log/git_remote.md) 本地倉庫與遠程倉庫連接配置指令: 我兩才是git指令權限最高擁有者!