I found myself using the Terminal in SourceTree a lot recently on my office pc. When I got home however, I noticed this does not work on my laptop, the error I receive is the following:
I have tried googling the problem and reinstalling git and SourceTree, with no results.
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.