'git log' failed with code -1:'launch path not accessible----- how can I solve this problem?

Lily LI March 1, 2015

my sourcetree  got some error when I try to open my repo:'git log' failed with code -1:'launch path not accessible

I am not sure whether  I made a mistake in deleting some file to cause this thing,  anyway ,now how can I do to solve this error?

4 answers

11 votes
Michael Hawkins April 9, 2015

I didn't have to reinstall git I just had to tell SourceTree what git executable to use. I'm on OSX Yosemite (10.10.3) with a Homebrewed git install so I opened SourceTree and navigated to SourceTree...Preferences and selected the Git Tab. I then clicked "Use System Git" and navigated to /usr/local/Cellar/git/2.3.5/bin/git.

jd_dhang January 8, 2019

thanks!

JJ Bates February 28, 2019

Worked for me! Thank you!

David Pellegrini June 18, 2019

Worked for me, too. Hooray!

GriehleNEF September 12, 2019

Fantastic explanation of the fix. 

pix April 18, 2020

went to preferences, git, clicked the system git button, it automatically opened the right path, clicked on git, thats it, fixed.. osx catalina

Like Ayse BIROL likes this
Ayse BIROL November 10, 2022

this worked for me too. thanks..

Patrick Melo November 25, 2022

I experienced this with the upgrade to Ventura 13.0.1 also. "Use system git" fixed the problem. Thanks!

1 vote
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 1, 2015

If you reinstall Git (no need to uninstall it first, just start the installer again), any accidentally removed files will be put back. (In SourceTree, make sure you are using the system Git, not the embedded one. The option is in Tools\Options\Git.)

Lily LI March 1, 2015

reinstall Git?which didn't cause my current repos disappear? I already built many repo in sourcetree and used them for a long time, until recently I just clear some trash for my hd , after that, when I open any repo, then show the error I posted in the title

Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 1, 2015

Reinstalling Git will not change your clones in any way.

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 2, 2015

When you say you cleared trash, did that trash include ".git" folders? If so, you've deleted your repositories, and you'll have to re-clone then from your remotes. Your working copy should still be present, so you can use that to recover any changes that weren't pushed to the server.

Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 2, 2015

You cannot clone into a non-empty folder, so if you do this, you need to create new clones and overwrite the working copy with the current set of files.

0 votes
Chris Marabate April 9, 2020

I have the same exact issue with Sourcetree and when I go to Tools\Options\Git under Git Version, the "System" button is grayed out. I was just trying it out to see if I liked it better than GitHub Desktop and it seems like it might be but it is so much more difficult to get setup correctly and I lost my patients with it.

I give up for now but if somebody is able to help me on here I will give it another chance.

0 votes
CI User June 14, 2019

This can also happen with latest SourceTree if git is reinstalled. Sadly SourceTree fails the ability to detect fit installed on /usr/local/bin/git -- which happens to be the default location for git when installed with homebrew on MacOS.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events