4

I'm using Windows 10, SourceTree and Git .

When i want to Switch branch by using the SourceTree terminal it shows :

error: pathspec '3.Building-the-API-Implementing-Basic-Requirements' did not match any file(s) known to git.

enter image description here

But if i execute same command from Git Bash in my project directory, it works fine.

enter image description here

enter image description here

Why the SourceTree terminal is not working ? Is there any issue to work SourceTree terminal ?

Arif
  • 6,094
  • 4
  • 49
  • 81
  • What does `git status` show you from the bash _before_ you attempt to do a checkout from SourceTree? – Tim Biegeleisen Mar 26 '16 at 09:52
  • It is possible that there is a bug in SourceTree or that it has become corrupted. Try Googling for the exact error message. – Tim Biegeleisen Mar 26 '16 at 09:57
  • There is no such thing as *"SourceTree Terminal"*. SourceTree starts the console program specific to the OS you use. Maybe it doesn't launch it with the correct arguments/configuration. – axiac Mar 26 '16 at 09:59
  • It Shows : `$ git status On branch master Your branch is up-to-date with 'origin/master'. nothing to commit, working directory clean` – Arif Mar 26 '16 at 10:11
  • @axiac I also know that, but anyway it is not working when i start *Terminal* from SourceTree. – Arif Mar 26 '16 at 18:37
  • what `git --version` says in both terminals? I suspect you actually have different gits – max630 Mar 29 '16 at 19:19

3 Answers3

5

For the record, I just found out that the Git 2.31 update on SourceTree 3.3.4 Windows causes this very issue, either if you're using the embedded or system Git, and can be fixed by reverting to Git 2.30.2, either configuration.

3

I, too, have Git 2.31.1 installed in the System and using it as my Sourcetree's Git version (not Embedded).

Alternatively, without reinstalling Sourcetree:

  1. Go to Tools > Options > Git.
  2. Uncheck/disable Use Git Bash as default terminal..
  3. Restart Sourcetree (optional).
  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.

  1. Go back to Tools > Options > Git.
  2. Check/Enable Use Git Bash as default terminal..
  3. Restart Sourcetree (optional).
  4. Clicking on the Terminal now could launch Git Bash.
kakaiba
  • 31
  • 3
  • Thanks for the help. I just received a new computer for work, and unfortunately the exact same symptom shows up on a fresh install. – Stéphane Perras May 20 '21 at 16:24
0

I solved this issue by re-install (uninstall and install) SourceTree. So i think my installed SourceTree was corrupted somehow.

Arif
  • 6,094
  • 4
  • 49
  • 81