【问题标题】:Still a problem with Git after installing MacOS Mojave安装 MacOS Mojave 后 Git 还是有问题
【发布时间】:2019-03-26 18:01:34
【问题描述】:

我最近将我的 MacOS 升级到 Mojave,现在我发现 Git 不起作用。当我尝试在我的机器上初始化一个新的 git repo 时,我继续收到以下错误消息:

error: could not expand include path '~/.gitcinclude'
fatal: bad config line 44 in file /usr/local/git/etc/gitconfig

这是我机器上 gitconfig 文件的第 43-46 行:

[include]
    path = ~/.gitcinclude
    path = .githubconfig
    path = .gitcredential

我遵循了另一个 stackOverflow 问题 (Git is not working after macOS Mojave Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)) 的建议,但 Git 仍然拒绝工作。具体来说,我运行以下代码来升级 xcode:

xcode-select --install

然后我重新设置 xcode 文件夹的路径:

sudo xcode-select -switch /Library/Developer/CommandLineTools

关于我应该从这里去哪里有什么建议吗?

【问题讨论】:

标签: git macos include


【解决方案1】:

我明白了。另一个 stackOverflow 问题的第二个答案起到了作用。我在之前的搜索中错过了它,因为这个问题没有专门解决 MacOS 问题。

Git Could not expand include path '~/.gitcinclude', fatal: bad config file line 49 in /usr/local/git/etc/gitconfig

【讨论】:

    猜你喜欢
    • 2019-05-20
    • 2020-12-18
    • 2020-07-16
    • 2019-03-27
    • 2020-12-10
    • 2019-08-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多