SourceTree 1.6.14 cannot find Git 2.4.0 installation on Windows

After installing Git 2.4.0 on my Windows 7 system, I tried to change the option in SourceTree 1.6.14 to “Use System Git”, rather than the embedded version.

However, upon clicking “Use System Git”, nothing happened and the setting remained set to “Use Embedded Git”.

  • git line ends redux - Mac OS git with contributions for Windows user
  • Mercurial repo too large, can't connect, clone
  • How can I create a patch that spans commits using Sourcetree?
  • What is the difference between Stop Tracking and Discard File in git SourceTree
  • How to trash all local git changes and revert to old commit?
  • How can I pull the changes from GitHub without pushing mine?
  • How can I make SourceTree use the installed version of Git?

  • Cannot push to GitHub - keeps saying need merge
  • npm install giving error while accessing GIT url
  • Rebase a branch without checking it out
  • GIT - Difference between tracking a branch versus cloning
  • Git: Having two different repos for public and deployment code
  • git remote branch monitoring
  • One Solution collect form web for “SourceTree 1.6.14 cannot find Git 2.4.0 installation on Windows”

    This will be probably fixed in a future patch for SourceTree, however, until it does there is a workaround as follows.

    Git versions prior to 2.0 stored git.exe in a subdirectory called bin and this is what SourceTree is looking for. As of Git >=2.0, git.exe moved into a folder named cmd.

    Therefore, the easiest way to get SourceTree to recognise your Git installation, is to create a symbolic link for the folder using mklink as follows:

    C:\Program Files (x86)\Git\>mklink /D bin cmd

    Whilst the above fixes Git for the normal GUI operations (commit/push etc.) it does not fix the “Terminal” button, as this command tries to execute sh.exe via the following command and fails as sh.exe has also been moved in Git 2.4.

    "C:\Windows\System32\cmd.exe" /c "C:\Program Files (x86)\Git\bin\sh.exe" --login -i

    Edit 2: Further reading – this was raised as an issue by the Git for Windows maintainers here.

    Git Baby is a git and github fan, let's start git clone.