致命:文件.git/config中的错误配置行1

c0vxltue  于 2022-10-23  发布在  Git
关注(0)|答案(2)|浏览(272)

致命:文件.git/config中的错误配置行1
在尝试运行flutter时,我遇到了这个错误。我尝试了flutter升级——force、flutter通道稳定以及重新安装flutter,但这些命令都没有修复错误

cyej8jka

cyej8jka1#

我通过删除flutter/下的配置文件解决了这个问题。git/config,然后运行
初始化
命令。然后跑去扑扑医生,一切都很好。

ncecgwcz

ncecgwcz2#

您的$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。

相关问题