【问题标题】:git: 'credential-' is not a git command after installing SourceTreegit: 'credential-' 不是安装 SourceTree 后的 git 命令
【发布时间】:2018-10-29 07:17:58
【问题描述】:

我在 Macbook 的终端上使用 git。

我最近安装了 SourceTree 作为 git 的 GUI 工具。但在那之后,我意识到 SourceTree 更改了我的本地 git 存储库配置,并且我的命令 git push、git pull 或 git fetch 的行为发生了变化。

现在我得到了这些命令的输出。

git: 'credential-' is not a git command. See 'git --help'.

The most similar command is
    credential

谁能帮我解决这个问题?我的 repo 托管在 GitHub 上,在这个奇怪的输出之后,命令正确运行。

【问题讨论】:

  • 您的.bashrc 文件是否有任何可见的变化?
  • 我的主目录中没有这个文件。
  • 运行git config --global -e并检查它是否不起作用然后尝试git config --remove-section credential
  • git config --remove-section credential 修复问题。谢谢@rahulmishra
  • 好的,我将它作为答案发布,请接受谢谢!

标签: git macos terminal atlassian-sourcetree


【解决方案1】:

问题由git config --remove-section credential解决

谢谢!

【讨论】:

    猜你喜欢
    • 2022-07-06
    • 2013-06-10
    • 2017-01-23
    • 2023-03-20
    • 2021-11-01
    • 2012-11-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多