Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 237
Vasi Marin Avatar asked Sep 17 '25 20:09

Vasi Marin


1 Answers

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

like image 53
Vasi Marin Avatar answered Sep 19 '25 12:09

Vasi Marin