I downloaded Github for windows and installed it on my computer, which runs windows 7. I tried to open a project with Android Studio but it says "Can't start Git: git.exe" and "IDE error".
When I click "Fix it" it shows:
"Cannot run program "git.exe": CreateProcess error=2, The system cannot find the file specified".
So I googled and I tried to find git.exe file in my Github folder. In my Github folder there is two folders: one is a project shared by my friend and the other one is "Git1". In Git1 foler, there are only two files: ".gitattributes" and ".gitignore" I can't find "git.exe" file even with the search bar of windows.
How can I fix this error?
This question is related to
github-for-windows
The last update for "windows git" did move the git.exe file from the /bin folder to the /cmd folder. So, to use git with IDEs such as webStorm or Android Studio you can use the path :
C:\Users\<user>\AppData\Local\GitHub\PortableGit_<..numbers..>\cmd\git.exe
But if you want to have linux-like commands such as git, ssh, ls, cp under windows powerShell or cmd add to your windows PATH variables :
C:\Users\<user>\AppData\Local\GitHub\PortableGit_<...numbers...>\usr\bin
change <user> and <...numbers...> to your values and reboot!
Also, you will have to update this everytime git updates since it might change the portable folder name. If folder structure changes I will update this post.
Thx @dennisschagt for the comment above! ;)
I found my git.exe
here
C:\Program Files\Git\bin\git.exe
while installing git
, it asks for the location. copy it and use it.
I faced the same issue and was not able to find it out where git.exe is located. After spending so much time I fount that in my windows 8, it is located at
C:\Program Files (x86)\Git\bin
And for command line :
C:\Program Files (x86)\Git\cmd
Hope this helps someone facing the same issue.
As of version 2.10.1, here is the path -
C:\Users\usersam\AppData\Local\Programs\Git\cmd\git.exe
run github that you downloaded, click tools and options symbol(top right), click about github for windows and then open the debug log. under DIAGNOSTICS look for Git Executable Exists:
1) Install Git for Windows from here: http://git-scm.com/download/win
2) Note: During installation, Make sure "Use Git and optional Unix tools from the windows command prompt" is selected
3) restart the Android Studio and try again
4) Go to File-> New -> Project from version control -> Git
The path for the latest version of Git is changed, In my laptop, I found it in
C:\Users\Anum Sheraz\AppData\Local\Programs\Git\bin\git.exe
This resolved my issue of path. Hope that helps to someone :)
Source: Stackoverflow.com