Git 工做環境配置

Git config 簡單介紹

Git的配置選項有:-system,-global 和 -local。html

① system:系統級別的全局設置,對全部電腦用戶生效,文件在/etc/gitconfig;ios

② global:我的用戶的全局配置,對全部我的用戶的代碼庫生效,文件在$HOME/.config/git/config或者~/.gitconfig;git

③ local:代碼庫的設置,僅對設置的代碼庫生效,文件在代碼庫的.git/config。ui

 

git config經常使用命令

//顯示全局配置信息
git config --global --list //設置全局的用戶名和郵箱
git config --global user.name "wellphone" git config --global user.email wellphone@example.com //開啓顏色
git config --global color.ui true

 

詳細配置請見:Git配置教程spa

 

 

 

 

 

 

 

參考:Git 配置code

相關文章
相關標籤/搜索