本文介绍了GitHub错误“致命:.git / config中错误的配置文件第1行”在git shell中时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows上使用GitHub,并且在整个过程中都正常运行之后,今天我打开它时,它说:

Im using GitHub on Windows and after working fine for the whole time, when I opened it today, it says:

然后:

我打开shell并尝试 git status 或任何其他命令,它将返回此错误:

When I open shell and try git status or whatever other command, it returns this error :

不知道该怎么办?我读过有人说用较早的版本替换配置文件,但是我没有较早的版本。.

Not sure what to do with that? I read someone saying to replace the config file with an earlier version of it, but I dont have an earlier version..

推荐答案

我的问题可能有点含糊,但是我不确定自己发生了什么。通过使用Windows搜索在笔记本电脑上找到.git / config文件并将其删除,我解决了该问题。然后我删除了我的github文件夹中的内容,并再次克隆了存储库,并且在::

My question might have been abit vague, but I wasnt sure myself what happened. I solved it by finding .git/config file on my laptop using Windows search , and deleting it. Then I deleted content of my github folder and cloned the repo again and it worked after :)

这篇关于GitHub错误“致命:.git / config中错误的配置文件第1行”在git shell中时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-04 21:00