Reputation: 6128
Can't start Git: C:\Users\Cloudion PC\AppData\Local\GitHub\PortableGit_d93ee8917cfa9add886773e6be9ec08609a502b6\bin\git.exe Probably the path to Git executable is not valid.
I am getting the above message which is related to the git in android studio for windows.so far I am using android studio without any problem for last couple of months. now I am getting this all the time I type the code.
`C:\Users\Cloudion\AppData\Local\GitHub\PortableGit_d93ee8917cfa9add886773e6be9ec08609a502b6\bin\git.exe`
but now I cant find git.exe
at the above. What happened? Does the location change?
Upvotes: 13
Views: 45941
Reputation: 1
I was able to open the executable from the following directory:
C:\Users\YOUR-USER-NAME\AppData\Local\GitHubDesktop\app-0.5.3\resources\app\git\mingw64\bin\git.exe
Upvotes: 0
Reputation: 8305
You first need to install git into your system if it is not already installed, check this link where you find download link and installing steps.
After successful installation you need to set the path of git.exe, So follow this:
File-> Setting-> Version Control -> Select Git From list-> in the right panel add path of git.exe in front of Path to Git executable
It was C:\Program Files\Git\bin\git.exe
in my case. click on test to check and then apply and ok.
Upvotes: 0
Reputation: 341
Type which git in your terminal/cmd (find out the git path)
which git
It will give you the original path, where it is installed. Then pass/set that path in your android studio and then click test button. It will be shown success.
My mistake was, previously I had a path like /usr/bin/git
It doesn't work.
Then
which git
It gave the correct path. /usr/local/bin/git
FYI, I'm using Mac
Upvotes: 2
Reputation: 10890
After installing GitHubDesktop: https://desktop.github.com/, depending on your version, the location looks like:
C:\Users\YOUR-USER-NAME\AppData\Local\GitHubDesktop\app-0.5.3\resources\app\git\mingw64\bin\git.exe
In the Android Studio event console you can click on +Fix it+ link, right after Can't start Git: git.exe Probably the path to Git executable is not valid.
message. This brings you to the setting window to enter the full path to the git.exe
Upvotes: 3
Reputation: 6128
finally I got it. the location of git.exe is changed from
C:\Users\Cloudion\AppData\Local\GitHub\PortableGit_d93ee8917cfa9add886773e6be9ec08609a502b6\bin\git.exe
to
C:\Users\CloudionPC\AppData\Local\GitHub\PortableGit_c7e0cbde92ba565cb218a521411d0e854079a28c\mingw32\bin\git.exe
Upvotes: 12
Reputation: 31868
You need to set your Path to git executable to the folder where the git is installed on your system. Something like C:\Users\ProgramFiles.... The current path if you can see is not a good place to be. And every time you type a line of code Aandroi Studio seeks for the Git executable to trace the changes in the repo.
Upvotes: 7