SourceTree终端无法正常工作

时间:2016-03-26 09:36:13

标签: git sourcetree

我使用的是Windows 10,SourceTreeGit

当我想使用SourceTree终端切换分支时,它显示:

  

错误:pathspec' 3.Building-the-API-Implementing-Basic-Requirements'   与git已知的任何文件都不匹配。

enter image description here

但是如果我在项目目录中从 Git Bash 执行相同的命令,它可以正常工作。

enter image description here

enter image description here

为什么SourceTree终端无法正常工作? SourceTree终端是否有任何问题?

3 个答案:

答案 0 :(得分:4)

作为记录,我刚刚发现 SourceTree 3.3.4 Windows 上的 Git 2.31 更新会导致这个问题,无论您使用的是嵌入式 Git 还是系统 Git,并且可以通过恢复到 Git 2.30.2 来修复, 任一配置。

答案 1 :(得分:2)

我通过重新安装(卸载并安装)SourceTree解决了这个问题。所以我认为我安装的SourceTree在某种程度上已经损坏了。

答案 2 :(得分:0)

我也在系统中安装了 Git 2.31.1 并将其用作我的 Sourcetree 的 Git 版本(非嵌入式)

或者,无需重新安装 Sourcetree:

  1. 转到Tools > Options > Git
  2. 取消选中/禁用 Use Git Bash as default terminal.
  3. 重启 Sourcetree(可选)。
  4. 现在单击终端将在存储库的主目录中启动终端/命令行。

在某些情况下,根据您的 Git 和 Sourcetree 的配置和附加组件,您也可以在上述第 4 步之后执行此操作。

  1. 返回Tools > Options > Git
  2. 检查/启用 Use Git Bash as default terminal.
  3. 重启 Sourcetree(可选)。
  4. 现在点击终端可以启动Git Bash