You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Should use git for windows on windows hosts (and probably allow advanced config to override git.exe location) #12431
GitHub Desktop bundles git cli tools for doing all the heavy lifting - which is great for users, but doesn't appear to run the same as portable git for windows and that means that it's not running as expected with git hooks:
Now this is the process tree when git is run from GitHub Desktop:
And the problem (probably) is that intermediate conhost.exe (I guess, probably set up to run within a MING environment).
I believe that GitHub Desktop should be using Portable Git on Windows (and it would also be very nice if there were a UI setting to change which git.exe to use, for exactly issues like this)
Behavior is described below.
Version & OS
OS: Windows 10
GitHubDesktop: 2.8.3 (x64)
Steps to reproduce the behavior
Create a new Node project (npm init -y)
Install the pre-git package, which sets up hooks (this is just the easiest way to see the problem, but I'm sure manual hooks will have the same issues)
Attempt to commit via GitHub desktop
See error:
./node_modules/.bin/pre-commit: line 5: cygpath: command not found
sh: /../pre-git/bin/pre-commit: No such file or directory
(this stems from the pre-git script thinking it's in an MSYS environment, but missing the cygpath tool)
Expected behavior
I expect git commands to work as expected. Now, one could argue that the problem stems from lines like this in the installed pre-git hooks (now offloaded into the package's code under node_modules):
but the issue here would then be that if git is running in a matching environment, it should have the expected cypath utility, or something equivalent. The problem could be resolved by simply using the official portable binaries for git.
Actual behavior
No git operations work with pre-git installed (same would happen for any other tool attempting to run properly under an MSYS/CYGWIN environment)
Activity
tidy-dev commentedon Jul 14, 2026
See comment #17801 (comment)