1

When trying to use the Synchronize Change button at the bottom left corner of Visual

Studio Code I get a

git: 'remote-https' is not a git command

The logs show that this:

> git pull --tags origin master
git: 'remote-https' is not a git command. See 'git --help'.

However, I can still Git pull/push from the Terminal in VS Code. The only thing that causes this error is the Synchronize Change button. I've reinstalled Git for Windows but it didn't fix the issue. I can see that git-remote-https.exe is located in

"C:\Program Files\Git\mingw64\libexec\git-core"

but I'm not sure how VS Code Synchronize Change should reference that.

1 Answers1

0

If you see an error like:

enter image description here

Check your %PATH% first.
In a CMD, type set path.

For testing, type in that CMD:

set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
set "GH=C:\Program Files\Git"
set "PATH=%GH%\bin;%GH%\cmd;%GH%\usr\bin;%GH%\mingw64\bin;%GH%\mingw64\libexec\git-core;%PATH%"

Then, still from that CMD, launch VSCode (make sure the other one was closed first)

"%LOCALAPPDATA%\Programs\Microsoft VS Code\bin\code.cmd"

See if the issue persists then.

Another approach is to set C:\Program Files\Git\bin\git.exe in git.path, as seen here.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250