Git 工作环境配置

Git config 简单介绍

Git的配置选项有:-system,-global 和 -local。

① system:系统级别的全局设置,对所有电脑用户生效,文件在/etc/gitconfig;

② global:个人用户的全局配置,对所有个人用户的代码库生效,文件在$HOME/.config/git/config或者~/.gitconfig;

③ local:代码库的设置,仅对设置的代码库生效,文件在代码库的.git/config。

git config常用命令

//显示全局配置信息
git config --global --list

//设置全局的用户名和邮箱
git config --global user.name "wellphone"
git config --global user.email [email protected]

//开启颜色
git config --global color.ui true

详细配置请见:Git配置教程

参考:Git 配置

猜你喜欢

转载自www.cnblogs.com/EchoHG/p/9402126.html
今日推荐