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

前端 未结 2 1574
野的像风
野的像风 2021-01-04 07:10

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         


        
相关标签:
2条回答
  • 2021-01-04 07:56

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

    0 讨论(0)
  • 2021-01-04 08:00

    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.

    0 讨论(0)
提交回复
热议问题