简体   繁体   English

SourceTree 终端无法正常工作

[英]SourceTree Terminal not working properly

I'm using Windows 10, SourceTree and Git .我正在使用 Windows 10、 SourceTreeGit

When i want to Switch branch by using the SourceTree terminal it shows :当我想使用 SourceTree 终端切换分支时,它显示:

error: pathspec '3.Building-the-API-Implementing-Basic-Requirements' did not match any file(s) known to git.错误:pathspec '3.Building-the-API-Implementing-Basic-Requirements' 与 git 已知的任何文件都不匹配。

在此处输入图片说明

But if i execute same command from Git Bash in my project directory, it works fine.但是如果我在我的项目目录中从Git Bash执行相同的命令,它就可以正常工作。

在此处输入图片说明

在此处输入图片说明

Why the SourceTree terminal is not working ?为什么 SourceTree 终端不工作? Is there any issue to work SourceTree terminal ? SourceTree 终端有什么问题吗?

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

I, too, have Git 2.31.1 installed in the System and using it as my Sourcetree's Git version (not Embedded) .我也在系统中安装了Git 2.31.1并将其用作我的 Sourcetree 的 Git 版本(非嵌入式)

Alternatively, without reinstalling Sourcetree:或者,无需重新安装 Sourcetree:

  1. Go to Tools > Options > Git .转到Tools > Options > Git
  2. Uncheck/disable Use Git Bash as default terminal.取消选中/禁用Use Git Bash as default terminal. . .
  3. Restart Sourcetree (optional).重新启动 Sourcetree(可选)。
  4. Clicking on the Terminal now will launch a Terminal/Command-line in the repository's home directory.现在单击终端将在存储库的主目录中启动终端/命令行。

In some cases, depending on your Git's and Sourcetree's configuration and add-ons, you can also do this after Step 4 above.在某些情况下,根据您的 Git 和 Sourcetree 的配置和附加组件,您也可以在上述第 4 步之后执行此操作。

  1. Go back to Tools > Options > Git .返回Tools > Options > Git
  2. Check/Enable Use Git Bash as default terminal.检查/启用Use Git Bash as default terminal. . .
  3. Restart Sourcetree (optional).重新启动 Sourcetree(可选)。
  4. Clicking on the Terminal now could launch Git Bash .现在单击终端可以启动Git Bash

I solved this issue by re-install (uninstall and install) SourceTree.我通过重新安装(卸载和安装)SourceTree 解决了这个问题。 So i think my installed SourceTree was corrupted somehow.所以我认为我安装的 SourceTree 不知何故损坏了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM