致命:文件.git/config中的错误配置行1在尝试运行flutter时,我遇到了这个错误。我尝试了flutter升级——force、flutter通道稳定以及重新安装flutter,但这些命令都没有修复错误
cyej8jka1#
我通过删除flutter/下的配置文件解决了这个问题。git/config,然后运行初始化命令。然后跑去扑扑医生,一切都很好。
ncecgwcz2#
您的$FLUTTER_INSTALL_DIR/.git/config应该如下所示:
$FLUTTER_INSTALL_DIR/.git/config
[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true [remote "origin"] url = https://github.com/flutter/flutter.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "stable"] remote = origin merge = refs/heads/stable [branch "beta"] remote = origin merge = refs/heads/beta [branch "dev"] remote = origin merge = refs/heads/dev
请注意,这是不是您的git repo之一。如果不是这样,请重新安装flutter。
2条答案
按热度按时间cyej8jka1#
我通过删除flutter/下的配置文件解决了这个问题。git/config,然后运行
初始化
命令。然后跑去扑扑医生,一切都很好。
ncecgwcz2#
您的
$FLUTTER_INSTALL_DIR/.git/config
应该如下所示:请注意,这是不是您的git repo之一。如果不是这样,请重新安装flutter。