gitvisual-studio-codevscode-remote

Is it possible to use VScode as a remote editor for git?


The setup is the following:

A windows machine with VS code installed.

A Linux machine where the code is.

I connect with the VS code to the Linux machine.

Can the git on the Linux machine use the remove VS code as an editor?

Found this link but it did not say how to do such configuration: https://github.com/microsoft/vscode-remote-release/issues/933

Also this link did not helped me: https://github.com/roiderats/vscode-remote-remote

I tried from the VS code terminal the following command: git --mergetool -t "code --wait" but I get the following output: Unknown merge tool code --wait

I tried from the VS code terminal the following: git config --global core.editor "code --wait" Git tries to use vim as editor.


Solution

  • It seems that my mistake was that a gave the git difftool or git mergetool command from the Linux machine at that caused the error: Unknown merge tool code --wait

    Solution: Give the git difftool or git mergetool command from the terminal in VS code. It will work then.

    Follow this link for the settings: https://www.roboleary.net/vscode/2020/09/15/vscode-git.html