Git for Windows has recently updated to version 2.3.4. SourceTree couldn't find the newly installed Git for Windows 2.3.4 (both 32-bit and 64-bit). Any workaround?
A temporary fix for this is to create a symlink named "bin" in the Git directory that points to the cmd directory, where the Git executable is located in Git for Windows.
Open a command prompt (shift+right click, then Open command prompt here) in C:\Program Files\Git, and type this:
mklink /D bin cmd
Is SourceTree configured to use Embedded Git or System Git?
No. I uninstalled the old 1.9.5, and then install 2.3.4. Upon starting SourceTree, it said it can't find Git.
Ok, but that doesn't answer my question. "No" isn't a valid answer to "Embedded or System?" SourceTree only has those two options.
It is configured to use System Git.
Have you checked this page: https://confluence.atlassian.com/pages/viewpage.action?pageId=695108075 ? Check the git executable path when you're prompted. Another possible cause could be that Source Tree doesn't work with Git 2.x, but I don't know for sure about this one.
Good resource. Also check your PATH to make sure your new Git version is there.
This work!! Thanks Christian Grasso.
This allowed me back into SourceTree but the Terminal button no longer functions. It just momentarily flashes up a command prompt containing the error "'C:\Program' is not recognized as an internal or external command, operable program or batch file." Any idea how to fix the Terminal button as well?
Probably a bug in SourceTree. It doesn't add quotes to the command so the prompt takes only the part before the space. Didn't test this, but a fix would be installing Git in a path without spaces, like C:\Git
May I ask what you are refering to when you say "Git for Windows has recently updated to version 2.3.4"? At the moment the latest build I could find for windows was 1.9.5 and I'm quite interested to get a better version. Should I compile it myself? I'm not sure how to it properly... Thanks
@Pierre Garcia http://git-for-windows.github.io
Thanks a lot, that link is not even on the first page of google search, it deserves more visibility! Try searching "git for windows" (without quotes), nothing... Cheers, P P.S.: SourceTree's internal link ("update embedded git") also points to version 1.9.5.
The latest release candidate of Git for Windows has resolved this problem by adding some redirect executables to the /bin directory where SourceTree looks for Git. You need v2.4.4.2 RC3 or newer from https://github.com/git-for-windows/git/releases.
I believe Atlassian also have a fix in beta so that SourceTree looks in the proper /cmd directory.
The problem here is that the built-in bash profile (found at <strong>C:\Program Files\Git\etc\profile</strong>) expects a <strong>$MSYSTEM</strong> variable to be set to properly setup the $PATH variable. The default is to simply prepend the <strong>$MSYS2_PATH</strong> to <strong>$PATH</strong>. The problem is that this results in <strong>/bin</strong> lacking the <strong>git.exe</strong> executable. The best way to solve this is to edit C:\Program Files\Git\etc\profile and modify <strong>$MSYS2_PATH</strong> by appending <strong>:/cmd</strong> to the end. This will allow both <strong>git-bash.exe</strong> and the sourcetree terminal to load the correct environment.
<strong>C:\Program Files\Git\etc\profile</strong>
<strong>$MSYSTEM</strong>
$PATH
<strong>$MSYS2_PATH</strong>
<strong>$PATH</strong>
<strong>/bin</strong>
<strong>git.exe</strong>
C:\Program Files\Git\etc\profile
<strong>:/cmd</strong>
<strong>git-bash.exe</strong>
MSYS2_PATH="/usr/local/bin:/usr/bin:/bin:/cmd"
This worked for me.
I ran into this issue with SourceTree v3.2.6 and Git v2.24.0.2. I used default settings when installing both applications. Upon launching SourceTree, I was stuck in the popup window that says SourceTree can't find Git. In my case, launching SourceTree with admin privileges "fixed" the problem, but I have no idea why. Hopefully this note will help someone else.
It looks like you're new here. Sign in or register to get started.