git.exe error for android studio

拥有回忆 提交于 2020-02-20 08:47:45

问题


Recently I am trying to connect git hub repository to android studio but it shows following the error:


回答1:


get a git path from your pc

go to my computer >open c:drive > Users>YourUser>Appdata>Local>Github>PortableGit_\cmd\git.exe

then copy the file location and past it into your git executable path in android studio as shown in the above image




回答2:


Go to Settings-->Version Control-->Git and Fix Path to Git executable. Also click test button to check it is working.




回答3:


For my case git.exe was in the Path C:\Users\Username\ AppData\Local\GitHubDesktop\app-<appversion>\resources\app\git\cmd\git.exe




回答4:


I know this might sound stupid but yes, it is as stupid as it is!

I had this same error on Linux and was searching for a solution for two days! Then one day was trying to solve this, by chance, I cleared the path specified in android studio and Voilà! Android studio auto detected my git (facepalm)! And the interesting thing is it was not the path I was pointing to (bin/usr/git), and not the path returned by which git command (same path), it was /app/bin/git

For intellij idea and other products of JetBrains is quite the same issue, but the path detected by the two is different! Intellij idea was pointiong to /usr/bin/git!

For people still having this error even if their git is installed and android studio is pointing to its path, go to Settings -> Version Control -> Git and delete everything inside the text box with the label Path to Git executable, your android studio or what ever JetBrains product you're using, will auto-detect it.



来源:https://stackoverflow.com/questions/43573340/git-exe-error-for-android-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!