用户身份配置
每次提交都会使用到电子用剑和用户名来标记提交人
git config --global user.name "velscode"
git config --global user.email "[email protected]"
个人编辑器
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
[email protected]
core.editor='E:\ProSoftware\Notepad++\notepad++.exe' -multiInst -nosession
也可以通过git config <key>
获取某个键值的值
λ git config user.name
velscode