git 致命:/home/trx/.gitconfig 中的错误配置文件第 1 行
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14876728/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
fatal: bad config file line 1 in /home/trx/.gitconfig
提问by Chazt3n
I know this question has been asked a million times, but my ~/.gitconfig consists of only two lines, that are character correct with the tutorial.
我知道这个问题已经被问了一百万次,但我的 ~/.gitconfig 只包含两行,这与教程的字符是正确的。
git config --global user.name "trx"
git config --global user.email [email protected]
What could be the issue here?
这里可能有什么问题?
回答by Luigi R. Viggiano
This is my ~/.gitconfig:
这是我的 ~/.gitconfig:
[user]
name = Luigi R. Viggiano
email = luigi.viggiano@...
[color]
ui = true
[merge]
tool = p4merge
[diff]
tool = p4merge
[push]
default = simple
your ~/.gitconfig
is not in the correct format.
您~/.gitconfig
的格式不正确。
You don't need to put the commands:
您不需要放置命令:
git config --global user.name "trx"
git config --global user.email [email protected]
in a file... you need to type them at the terminal.
在文件中...您需要在终端输入它们。
Delete your ~/.gitconfig
and manipulate it using the git config
command at the terminal, as explained in the tutorial.
如教程中所述,~/.gitconfig
使用git config
终端上的命令删除并操作它。
回答by wRAR
These git config
lines are commands that you should run, not the contents for the config file.
这些git config
行是您应该运行的命令,而不是配置文件的内容。