fatal: bad config file line 1 in /home/trx/.gitcon

2020-03-01 07:50发布

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.

git config --global user.name "trx"
git config --global user.email chazx@live.com

What could be the issue here?

标签: linux git ubuntu
2条回答
▲ chillily
2楼-- · 2020-03-01 08:38

This is my ~/.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.

You don't need to put the commands:

git config --global user.name "trx"
git config --global user.email chazx@live.com

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.

查看更多
在下西门庆
3楼-- · 2020-03-01 08:46

These git config lines are commands that you should run, not the contents for the config file.

查看更多
登录 后发表回答