Home > Back-end >  Is it possible to use VScode as a remote editor for git?
Is it possible to use VScode as a remote editor for git?

Time:02-26

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.

CodePudding user response:

The normal solution would be to install Git for Windows on your Windows machine, clone the repo to the Windows machine and then edit the git repo directly on the Windows side.

CodePudding user response:

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

  • Related