致命:/home/trx/.gitconfig中的错误配置文件第1行

Cha*_*t3n 13 linux git ubuntu

我知道这个问题已被问过一百万次了,但我的〜/ .gitconfig只包含两行,这些内容与本教程相符.

git config --global user.name "trx"
git config --global user.email chazx@live.com
Run Code Online (Sandbox Code Playgroud)

这可能是什么问题?

Lui*_*ano 27

这是我的〜/ .gitconfig:

[user]
    name = Luigi R. Viggiano
    email = luigi.viggiano@...
[color]
    ui = true
[merge]
    tool = p4merge
[diff]
    tool = p4merge
[push]
    default = simple
Run Code Online (Sandbox Code Playgroud)

~/.gitconfig的格式不正确.

您不需要输入命令:

git config --global user.name "trx"
git config --global user.email chazx@live.com
Run Code Online (Sandbox Code Playgroud)

在文件中...您需要在终端输入它们.

~/.gitconfig使用git config终端上的命令删除并操作它,如教程中所述.