Issue
I’m trying to call git with only GitHub Desktop installed. I’m finding two binaries on disk. One (43 KB) at:
C:\Users\RNEL\AppData\Local\GitHubDesktop\app-2.9.0\resources\app\git\cmd
Another, much larger version (3,244 KB) at:
C:\Users\RNEL\AppData\Local\GitHubDesktop\app-2.9.0\resources\app\git\mingw64\bin
When I run git --version
I’m getting the same response git version 2.29.2.windows.4
Here’s the dependencies, with the larger one having more (image below)
Why the size difference? Do they both work? Is there a command to list "features" or to somehow tell the difference between the two other than the version?
Solution
The difference is that one of these is a wrapper script, and the other is the actual git.exe
binary.
Git for Windows ships a large number of Unix programs with Git Bash because Git has programs written in shell and those Unix programs are required for it to work. However, some of those programs, like find
, conflict with Windows binaries of the same name, so putting all those Unix programs in the PATH
would be undesirable when running in CMD or PowerShell. As a consequence, there are a small number of wrapper programs in one directory to invoke git
and similar programs, and this directory is in the PATH
, while the other one is not unless you’re using Git Bash.
On a Unix system, one would use symbolic links for this, but unfortunately on Windows, symbolic links either require special privileges or Developer Mode to be enabled, and as a result wrapper binaries are used to help users in these environments.
Answered By – bk2204
This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0