- 配置user信息
git config --global user.name 'your_name'
git config --global user.email 'your_email@domain.com'
config 的三个作用域
- git config --local:local只对某个仓库有效,缺省等同于local
- git config --global:global对当前用户所有的仓库有效(很常用)
- git config --system:system对系统所有登陆的用户有效(没啥用)
- 显示config的配置,加 --list
git config --list --local
git config --list --global
git config --list --system
注意⚠️:提交之后再去修改user的信息,之前提交对应的user信息并不会改变,只对之后的提交生效。










网友评论