简体   繁体   中英

Git command not working in VS Code terminal/cmd/powershell

I correctly installed GIT, but vs code command prompt responds:

"Git is not recognized as an internal or external command,operable program or batch file."

After adding:

"git.enabled": true,
"git.path": "C:\\'Program Files'\\Git\\mingw64\\bin\\git.exe",

it still won't work. Even after closing and opening vs code.

If vs code doesn't close your internal command prompt and reopens with it again, you have to close the cmd manually.

Have you tried using escaped double-quotes in your .json file, instead of adding single-quotes, which do not exist within the path a all ?

  "git.path": "\"C:\\Program Files\\Git\\mingw64\\bin\\git.exe\"",

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM