00. 使用Git之前的最小配置

2019-03-19  本文已影响0人  play_robot

配置user信息

配置user.name 和 user.email
作用:做code review时,如果每次变更带上email地址,那么评审人员指出哪里有问题时,git 版本管控web系统会自动发一封邮件给变更人员,因此配置的邮件必须是有效的email

git config --global user.name 'your_name'
git config --global user.email 'your_email@domain.com'

缺省等同于local

git config --local #只对某个仓库有效
git config --global #对当前用户所有仓库有效,这个常用
git config --system #对系统所有登录的用户有效,基本不会使用

显示config的配置,加 --list

git config --list --local
git config --list --global
git config --list --system
上一篇 下一篇

猜你喜欢

热点阅读