git报错:fatal: bad config line 1 in file C:/Users/JIANGXIAOLIANG/.gitconfig

在给git设置用户名和邮箱的时候报下面的错误:fatal: bad config line 1 in file C:/Users/JIANGXIAOLIANG/.gitconfig
看提示的意思是git配置文件出问题了,找到提示的目录,然后删掉.gitconfig文件。
然后在重新配置用户名和邮箱,输入下面的命令:

$ git config --global user.name "用户名"
$ git config --global user.email "邮箱"

 然后删除的.gitconfig文件又重新生成了,这时git就可以正常使用了。

猜你喜欢

转载自www.cnblogs.com/dotnet261010/p/10844090.html