I have looked at the other posts and have made certain that the path is correct to the executable file, as shown below. I can launch git from from this path outside of Android Studio. The current project is the "sunshine-version 2" from Udacity and it is a version or two old, but this should not affect the VCS from launching. I have read the other posts concerning this issue, but none have resolved this issue. Also, when Android Studio gradle runs, it will open git in several windows and then close them almost immediately. They pop-up for a second or two, and then close. It's definitely trying to run git, and then default closes?
I just went to the Git path ubication, the only different thing that I did was have stopped at the cmd folder. As you might see in the next screenshot
Subsequently, instead of choosing git-gui.exe option, I select just git.exe option. And it seems to work for me.
default path of git.exe for GitHubDesktop 64-bit version is
c:\Users\AppData\Local\GitHubDesktop\app-<version>\resources\app\git\cmd\git.exe
you should try this path.
in windows 10, 64bit version your installed git location is C:\Program Files\Git, There is a bin folder inside Git folder and there is a git.exe file, this is the file you have to choose or add in android studio.Works for me.
The path you configure for git should be C:\Users\Computer\Documents\Development\Git\cmd\git.exe
instead. You should use git.exe
not git-base.exe
.
And add git installed path to environment variables (for windows OS):
This PC -> properties -> Advanced system setting -> advanced Tab -> environment variables -> find path in system variables -> edit -> add the git installed path by ;C:\Users\Computer\Documents\Development\Git\cmd
-> ok.
...\Git\cmd\git.exe
. –
Contumacy C:\Users\Computer\Documents\Development\Git\cmd
in your environment variables? –
Contumacy As mentioned by Marina-MSFT, you should add git.exe instead of git-base.exe or any other .exe files. You could find git.exe under, in your case, C:\Users\Computer\Documents\Development\Git\bin\git.exe, normally the git.exe file is under bin file of Git you have installed
You should give a path in git.exe in cmd folder
Try this: C:\Program Files\Git\cmd\git.exe
This is the path where GitHub is located in its default installation. Remove the text including "<>" characters in below path and enter your relevant values.
c:\Users\<Your Windows username>\AppData\Local\GitHubDesktop\app-<version>\resources\app\git\cmd\git.exe
For x64-bit Windows version change the path directory to
Android Studio: File > Settings... > Version Control > Git
c:\Users\AppData\Local\GitHubDesktop\app-<version>\resources\app\git\cmd\git.exe
Change default settings on Android Studio
you should go into the "cmd" folder which is created in the main folder that you've installed the Git program. (usually is C:\Program Files\Git). In this folder you can find Git.exe then copy this address in configuration windows in Android Studio.
I notice a lot of the answers here are correct, depending on given user's circumstances, so I am consolidating and clarifying which is which. Hopefully, someone who comes across this finds it helpful.
When an application with Git integration support requests the location of the executable (or you want to add its location to your PATH environmental variable so that git
commands work on the command line without including the full path to the executable), that location depends on a few variables:
- whether you installed Git as an admin (for all Users); and,
- whether you installed the 64-bit / 32-bit version of Git
If git
commands work on the command line already
Then it is already properly configured as an environmental variable, and you can simply run:
In terminal/command console:
git --exec-path
In PowerShell:
Get-Command git
Running either of the above should get you the path to your git executable.
If you installed the 64-bit version of Git for all users (or as an administrator)
The path to your git.exe
executable should be:
C:\Program Files\Git\cmd\
If you installed the 32-bit version of Git for all users (or as an administrator)
The path to your git.exe
executable should be:
C:\Program Files (x86)\Git\cmd\
If you installed the 64-bit OR 32-bit version of Git as a regular user
The path to your git.exe
executable should be:
C:\Users\%USERPROFILE%\AppData\Local\Git\cmd\
Note: Replace
%USERPROFILE%
with name of the User whose account is the account on which Git is installed or you can simply paste the above into the address bar of a File Explorer window and pressEnter
to see if it's a valid location. Alternatively, the below should work as well:%LOCALAPPDATA%\Git\cmd\
File Explorer 'understands' that
%LOCATION%
variables should be substituted and the value that should replace it. Notice thatgit.exe
is intentionally excluded from the location to which we direct File Explorer because including it will effectively tell File Explorer to opengit.exe
which isn't the goal.
If you installed GitHub Desktop, do NOT try to use the included git.exe for third-party application integration!
Important to note that using the git executable that comes packaged with GitHub Desktop is not recommended* to using the embedded git executable that is packaged with GitHub Desktop to integrate other applications. You should install Git for Windows SCM to acquire the appropriate git.exe
.
* Good explanation why: GitHub Desktop Official Repository - Issues section
© 2022 - 2024 — McMap. All rights reserved.
Native
would be the path specified. It is strange that built-in would give the same error. Can you try Built-in without a path specified? Can you execute this from a command prompt? – Acanthaceous