I had a similar problem, if not the same. Found that Sourcetree (or some older version of Sourcetree) includes a portable version of git (that comes with its own shell). In my case that version was from 2015. I expect an upgrade elsewhere on my system or a PATH variable ordering problem caused some kind of DLL hell.
My solution:
Now SourceTree would use the official git instead of the built-in portable stuff. There is now a chance your terminal button works again.
I found a workaround.
Even though the terminal button does not work, I can still go to the folder where the repository is located and run git from there using the command line.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.