git 用户名和邮箱设置
2017-08-09 19:07
183 查看
首先,可以通过git config --list或者git config -l查看git 设置
用户名和邮箱地址的作用
用户名和邮箱地址是本地Git客户端的一个变量,不随git库而改变。
每次commit都会用用户名和邮箱纪录。
github的contributions统计就是按邮箱来统计的。
查看用户名和邮箱地址:
修改用户名和邮箱地址:
或者,通过.gitconfig文件中修改用户名和邮箱,如下
credential.helper=osxkeychain user.name=[name] user.email=[email] core.autocrlf=input core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true core.ignorecase=true core.precomposeunicode=true remote.origin.url=http://git..../mobile/H5-app.git remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* branch.master.remote=origin branch.master.merge=refs/heads/master branch.develop.remote=origin branch.develop.merge=refs/heads/develop branch.develop2.remote=origin branch.develop2.merge=refs/heads/develop2 branch.23108.remote=origin branch.23108.merge=refs/heads/23108 branch.22741.remote=origin branch.22741.merge=refs/heads/22741
用户名和邮箱地址的作用
用户名和邮箱地址是本地Git客户端的一个变量,不随git库而改变。
每次commit都会用用户名和邮箱纪录。
github的contributions统计就是按邮箱来统计的。
查看用户名和邮箱地址:
$ git config user.name $ git config user.email
修改用户名和邮箱地址:
$ git config --global user.name "username" $ git config --global user.email "email"
或者,通过.gitconfig文件中修改用户名和邮箱,如下
# This is Git's per-user configuration file. [user] # Please adapt and uncomment the following lines: # name = XXX # email = XXX@XX.com [user] name = XXX email = XXX@XX.com
相关文章推荐
- git设置用户名+邮箱+公钥
- Git设置用户名和邮箱
- git配置文件config用户名和邮箱的设置和查看
- git安装以及设置ssh,用户名和邮箱
- git 设置本地用户名和邮箱。
- eclipse中设置Git提交时的用户名和邮箱地址
- Git 当前项目设置 用户名、邮箱
- Git设置用户名和邮箱
- 设置git用户名和邮箱
- git配置文件config用户名和邮箱的设置和查看
- 设置ubuntu 下git 的用户名和邮箱
- 设置git的用户名邮箱
- 新电脑连接远程git库后,提交代码时报错让设置用户名和邮箱
- Git用户名邮箱的全局配置和单仓库配置
- git 怎么修改用户名和邮箱
- 【git】全局配置和单个仓库的用户名邮箱配置
- 修改git账号和提交的邮箱和用户名
- git设置用户名密码
- Linux环境下修改GIT的用户名和邮箱
- git用户名、邮箱错误导致提交失败