操作系统:Win8.1 64位; Git v 2.9.0
Git bash 2.9.0设置拒绝用户名&电子邮件配置错误消息
答案 0 :(得分:1)
在命令中,我输入了TA提供的代码:config [--local | --global] user.email" my email@etc.com" ;;记录错误消息:: --global] user.email command not found
符号[--local | --global]
是可选的OR
选项。 [-A|-B]
表示您应使用-A
或-B
作为参数来调用该程序。所以,你想:
$ git config --local user.email you@example.com
或
$ git config --global user.email you@example.com
来自git help config
:(大胆是我的)
在读取时,默认情况下会从系统,全局和存储库本地配置文件中读取值,并且可以使用选项 - system, - global, - local 和--file 告诉命令只从该位置读取(参见“FILES”一节)。
--local
表示仅限存储库配置。--global
表示您的所有git操作(用户级别)--system
表示系统范围配置(用户默认为未设置上述级别的用户)答案 1 :(得分:1)
user.name输入为:
$ git config --global user.name "Your Name"
$ git config --local user.name "Your Name"
user.email输入为:
$ git config --global user.email "Your email"
$ git config --local user.email "Your email
验证用户名和用户电子邮件:
$ git config --list