【发布时间】: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