pro*_*eek 35 git configuration
GIT的实用指南有以下内容"Git使用两者来计算提交ID-SHA-111哈希 - 它标识每个提交." 在第21页.
在第22页中,我可以使用以下命令"配置Git以了解您的身份".
git config --global smcho "Your Name"
当我运行它时,我收到以下错误消息.
error: key does not contain a section: smcho
这有什么问题?我想这与SHA-111哈希有关,但我不知道如何让它与git一起使用.
我认为user.name将被替换为我的名字,而不是部分/参数结构名称.更改后,它可以正常工作.
git config --global user.name "Your Name"
Bru*_*uno 42
不确定"smcho"的来源,但设置名称的设置是user.name
:
git config --global user.name "Your Name"
Run Code Online (Sandbox Code Playgroud)
您也可以设置您的电子邮件地址:
git config --global user.email "name@domain.example"
Run Code Online (Sandbox Code Playgroud)
我猜它抱怨缺少一个部分的原因是要设置的参数的名称可能需要分为两部分:( 如果查看配置文件,section.parameter_name
可以看到部分名称[]
,例如.git/config
).
(据我所知,这些都不是特定于OSX的.)
这个问题/问题的一个简单答案是,不要用实际的git用户名替换“ user.name”,而将user.name保留下来,因为该命令必须是:
git config --global user.name "Your Name here only"
Run Code Online (Sandbox Code Playgroud)