I have just downloaded the latest Git for Windows installer, v2.4. It appears to want to install to the standard Windows "Program files" (with-spaces-in-name) directory.
Since I have all my development code in a folder called (simply) "/bin
" -- I want to see if there's a command line option or parameter to change the install directory.
In my case, these days I use a environment variable such as GIT_HOME
for important software like git; so it would be useful if there was a way to apply that to things like git commands, etc once I have the program installed.
possibly related:
I also came across a few questions asking: "whereis git
". That's answered above, however I take that as an indicator that others may want git somewhere else too.
The default path is “C:\Program Files\Git“. If you want the software installed in a different location click Browse and specify a different folder. Click Next when ready to proceed. On this step, you are prompted to provide the name of the Start Menu folder in which the shortcuts for the application will be placed.
The default path on windows is C:\Program Files (x86)\Git . The name of the executable is not git.exe on all systems. Show activity on this post. It seems like git.exe can be found in different places depending on how it was installed, the version, and version of Windows.
To install Git, navigate to your command prompt shell and run the following command: sudo dnf install git-all . Once the command output has completed, you can verify the installation by typing: git version .
To start the installer with a different installation path you can open a CMD terminal in the same directory as the installer executable and pass in an option parameter of /DIR="x:\dirname"
For instance, if you have version 2.17.0 for Windows 64bit and you want to install git to D:\git, you would run:
Git-2.17.0-64-bit.exe /DIR="D:\git"
The installer will launch as usual and you need to walk through the other options, but the install location will be the path specified.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With