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

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?

2 answers

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

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

Reinstalling Git will not change your clones in any way.

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.

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.

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.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

842 views 3 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you