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”.

  • Merging master branch to another Git branch doesn't delete the files within branch
  • .gitignore doesn't ignore files
  • How to get a list of pull requests between 2 commits
  • Amend a past commit (remove files from more than one recent commit)
  • cannot pull Git remote repository from Sourcetree
  • How to recover LOST WORK resulting from the use of git?
  • How can I make SourceTree use the installed version of Git?

  • A multi-developer Git workflow, maintaining a clean history
  • GitBucket: error: Your local changes to the following files would be overwritten by merge
  • Git: can't undo local changes (error: path … is unmerged)
  • Why cherry pick shows conflicts in lines not touched by the commit?
  • Push with Git Bash works, but fails with Git Gui
  • Alternatives to GitHub Pages?
  • 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.