【问题标题】:Setting up Git User Name设置 Git 用户名
【发布时间】:2016-12-06 18:33:21
【问题描述】:

我正在按照说明设置 Git https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup

文档声明从命令行运行以下命令:

$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com

当我在前面带有 $ 符号运行这些命令时,我收到此错误:

 $git is not re-cognized as an internal or external command.

我也试过了:

git config --global user.name "John Doe"
git config --global user.email johndoe@example.com

当我运行这两行时,命令行返回到下一行,没有确认语句。

之后这两条命令好像没有生效。

我安装了带有 GitBash 的 Git。我在这里有什么明显的遗漏吗?

【问题讨论】:

标签: git


【解决方案1】:

$ 代表“prompt”。你不应该实际上写它;它的唯一目的是指示从哪里开始命令。

你应该分开写。

git config --global user.name "John Doe"

(按回车键)然后

git config --global user.email johndoe@example.com

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-10-21
    • 1970-01-01
    • 2017-06-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-02-01
    相关资源
    最近更新 更多