用户身份配置
每次提交都会使用到电子用剑和用户名来标记提交人
- Git config --global user.name "velscode"
- Git config --global user.email "velscode@gmail.com"
个人编辑器
Git 在需要输入消息的时候会使用到, 如果不配置, 会出现异常情况 (需要编辑的时候, 操作被提前终止)
Windows 上使用 Notepad++
Git config --global core.editor "'E:\ProSoftware\Notepad++\notepad++.exe' -multiInst -nosession"
中间是 Notepad++ 的安装地址
检查个人设置
如果要查看你的设置, 可以通过 Git config -list 命令列出所有的设置
λ Git config --list
- core.symlinks=false
- core.autocrlf=true
- color.diff=auto
- color.status=auto
- color.branch=auto
- color.interactive=true
- pack.packsizelimit=2g
- help.format=html
- http.sslcainfo=/ssl/certs/ca-bundle.crt
- diff.astextplain.textconv=astextplain
- rebase.autosquash=true
- filter.lfs.clean=Git-lfs clean -- %f
- filter.lfs.smudge=Git-lfs smudge -- %f
- filter.lfs.process=Git-lfs filter-process
- filter.lfs.required=true
- credential.helper=manager
- filter.lfs.clean=Git-lfs clean -- %f
- filter.lfs.smudge=Git-lfs smudge -- %f
- filter.lfs.process=Git-lfs filter-process
- filter.lfs.required=true
- user.name=velscode
- user.email=velscode@gmail.com
- core.editor='E:\ProSoftware\Notepad++\notepad++.exe' -multiInst -nosession
也可以通过 Git config <key > 获取某个键值的值
λ Git config user.name
velscode
来源: http://www.bubuko.com/infodetail-2997111.html