2016-07-06 57 views
1

操作系统:Win8.1 64bit; Git v 2.9.0Git bash setup拒绝全局/本地参数,无法设置用户帐号

Git bash 2.9.0设置拒绝用户名&电子邮件配置错误消息。

  • 已安装 - > exe'd - >没有欢迎消息只是计算机名称和$提示。
  • 在命令中,我输入了由我们的TA提供的代码:config [--local | --global] user.email“my [email protected]; rec'd错误消息:: --global] user.email命令未找到
  • 为user.name“name”重复并rec'd这些错误:: bash:-global] user.email命令未找到;错误:密钥不包含section [--local。这些是电讯局长在小组讨论中留下的指示。
  • 然后,我试图支持全球本身(git config [--global]并rec'd致命错误:不在git目录中。
  • 我卸载了程序并希望重新安装,但担心新的d /负荷将只从程序的第一个实例拿起旧的设置。 什么我需要做的设置我的Git的bash吗?我有一个任务,由于在一两天的,谢谢。

enter image description here

回答

1

In command, I typed in the code provided by our TA: config [--local | --global] user.email "my [email protected]"; rec'd error messages:: --global] user.email command not found

符号[--local | --global]是可选OR的选择。 [-A|-B]表示您应使用-A-B作为调用程序的参数。所以,你想:

$ git config --local user.email [email protected]

$ git config --global user.email [email protected]

git help config:(粗体是我的)

When reading, the values are read from the system, global and repository local configuration files by default, and options --system, --global, --local and --file can be used to tell the command to read from only that location (see the section called “FILES”).

  • --local意味着库只配置。
  • --global意味着所有的Git操作(用户级)
  • --system意味着系统范围内的配置(这些用户默认是没有上述水平设置)
+0

对不起JrBenito,我没有看到你的答案,直到后,我打中立柱。你的答案好多了,谢谢。 – KEll

+0

@KEll不需要抱歉,你终于找到了解决方案,这是首要目标;我们正在分享知识吗?此外,您仍然可以接受其中一个或另一个回答您的原始问题。 – JrBenito

1
  • 周围有局部或全局的无支架参数。
  • 有定义的参数和参数之间的空间
  • user.name输入为:

    $ git config --global user.name "Your Name" 
    $ git config --local user.name "Your Name" 
    
  • 用户。输入电子邮件为:

    $ git config --global user.email "Your email" 
    $ git config --local user.email "Your email 
    

验证用户名和用户的邮箱:

$ git config --list