
*****
### 配置文件存放三個位置
- 項目配置文件:項目/.git/config
```
git config --local user.name 'juran'
git config --local user.email 'juran@xx.com
```
- 全局配置文件:~/.gitconfig
```
git config --global user.name 'juran'
git config --global user.name 'juran@xx.com
```
- 系統配置文件:/etc/.gitconfig
```
git config --system user.name 'juran'
git config --system user.name 'juran@xx.com'
注意:需要有root權限
```
### 免密碼登錄
- URL中體現
```
原來的地址:https://github.com/WuPeiqi/dbhot.git
修改的地址:https://用戶名:密碼@github.com/WuPeiqi/dbhot.git
git remote add origin https://用戶名:密碼@github.com/WuPeiqi/dbhot.git
git push origin master
```
- SSH實現
```
1.生成公鑰和私鑰(默認放在~/.ssh目錄下,id_rsa.pub公鑰、id_rsa私鑰) ssh-keygen
2.拷貝公鑰的內容,并設置到github中。
3.在git本地中配置ssh地址
git remote add origin git@github.com:WuPeiqi/dbhot.git
4.以后使用
git push origin master
```
### git忽略文件
讓Git不再管理當前目錄下的某些文件。
```
*.h
!a.h
files/
*.py[c|a|d]
```
更多參考:https://github.com/github/gitignore
### github任務管理相關
- issues,文檔以及任務管理。
- wiki,項目文檔。