Reported in https://twitter.com/ArtVandelay440/status/941408422217601030
https://github.com/Microsoft/vscode/issues/32739 used to find git on the path. We should add the default user installation dir to the set of paths we search.
Might be a good candidate for recovery build?
Hi, buddy! I find a way to reslove this.
when you config your git path , DO NOT use the windows style path ,llike this: D:\\DevelopTool\\Git\\bin\\git.exe
Should use linux style , D:/DevelopTool/Git/bin/git.exe.
maybe this will help someone! 😄
@WallenHan D:\\DevelopTool\\Git\\bin\\git.exe style works for me on Windows 10 with VSCode 19.0
@liaoya I had tried this. but not work. Fortunately, the linux style works well。
Automatically launching git was disabled because of #32739.
Automatically launching Git from Github for Windows was disabled because of #35965.
We should add the default user installation dir to the set of paths we search.
@Tyriar I don't understand what you mean by that since the Git installer doesn't seem to have a user-only option. At least I could not find one.
Also, the latest version shows a popup, guiding the user of what to do, for those who did not install Git in its default path:

Nevertheless, we can experiment with using something like node-whereis to see if we find a git.exe somewhere in the user's PATH.
The problem is, that the default setup for git, which is also reached by the "download Git" button in the error message, is installing git into the hidden appdata-folder of the users profile directory. There is no option to install it even optionally in the program folders (tried 3 times now, altough i had already installed (or because?))
So it would be nice if you would also include to search it automatically in the specific users folder (eg. %userprofile%\AppData\Local\Programs\Git\cmd)
because the error message currently does confuse. Currently the user (at least on win10) has to install git AND has to configure the git.path. Only installing it does not fix it.
EDIT:
Okay, it was BECAUSE it had already installed it. The current version installs into the program-folder by default. But I can´t imagine installing it into my profile in the past. Anyhow the user profile path should be added to the default-lookup too.
The problem is, that the default setup for git, which is also reached by the "download Git" button in the error message, is installing git into the hidden appdata-folder of the users profile directory.
@LeopoldLerch Totally agree. I couldn't get the same behaviour to happen on my machine... How does the setup propose that path to you?
Well, when already installed, it does not . I uninstalled it, and then the usual path-picker for the installation path is displayed. Which is now preset to C:\Program Files.
Don´t know why it it was installed in my users-directory or how i managed it on a previous version. But I surely did not provide the path to my profile in a textbox. Maybe there was a default option to install it for all users or just me in the path.
Got it. Can you re-confirm that the path is indeed %userprofile%\AppData\Local\Programs\Git\cmd?
it was at least previously. After uninstalling i had only the option to set the path, but it is now pretargeting the programs-folder. And now it works without setting git.path explicitly in vs-code.
OK pushed two changes:
%LOCALAPPDATA%\Programs\Gitgit.exe in the PATH (as opposed to blindly spawning git)Verification
%LOCALAPPDATA%\Programs\Git and don't put it in the PATHC:\Git, for example, and put it in the PATHIn both scenarios, VS Code should pick it up.
I'm promoting this issue to a recovery candidate build: 1.19.1.
The problem is very serious. Please fix it as soon as possible.
I also encountered this problem, add 'git.path' user setting to resolved temporarily.
I verified the steps from https://github.com/Microsoft/vscode/issues/40229#issuecomment-351960784
如果使用中文的Windows 10出现git.path明明配置了但还是报错找不到git的情况,请把配置的路径删了自己手打一遍,因为从资源文件属性中复制的路径可能存在编码问题,如下图:


For future reference: I believe Git defaults its install location to the local app. data folder when the user doesn't have the administrative rights to install to the system's program files.
Hope to change back. If use git.path to set git.exe. It means I can't use same config at different workspaces with some sync plug-in.
This has already been fixed and might already be available in the insiders edition. It will be rolled out to stable with the next recovery release.
Windows 7: my Git is installed here: C:\Users\jkahl1\AppData\Local\Programs\Git\cmdgit.exe
After taking the VSCode 1.19.0 update this morning I am blown out of the water!
How do I fix this? Help!
Can I roll back my VS Code version?
@JoeKahl set the git.path setting to your local path to fix the issue until the recovery release is out.
@Tyriar Thank you. Here is what worked for me.
I used VS Code to add an override in my user settings, File / Preferences / Settings :
"git.path": "C:\\Users\\uuuuuuu\\AppData\\Local\\Programs\\Git\\cmd\\git.exe"
Then I closed and opened VS Code and I am back in business.
The Warn message is actually quite good.
My additional challenge was that my VS Code experience is only a few months and today was my first time to configure preferences.
In the usual settings file of VSCode. You can reach it via Ctrl-Comma (at
least on Windows) or via File > Preferences > Settings. Then enter git.path
in the search field.
2017-12-20 18:49 GMT+01:00 Joe Kahl notifications@github.com:
Thank you Tyriar. One more piece of info and I should be good. Where is
the git.path configured?—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode/issues/40229#issuecomment-353134415,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAQIjq6h7-S5vM9S3AT4rBGo1U09Z-hBks5tCUi3gaJpZM4RCrbb
.
--
Dirk Räder
Morissestr. 7
26180 Rastede
T: +49-4402-5157715
M: +49-176-60835036
E: [email protected]
Me having the same with GitHub portable version
Most helpful comment
OK pushed two changes:
%LOCALAPPDATA%\Programs\Gitgit.exein thePATH(as opposed to blindly spawninggit)Verification
%LOCALAPPDATA%\Programs\Gitand don't put it in thePATHC:\Git, for example, and put it in thePATHIn both scenarios, VS Code should pick it up.
I'm promoting this issue to a recovery candidate build: 1.19.1.