繁体   English   中英

是否可以使用 VScode 作为 git 的远程编辑器?

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

设置如下:

安装了 VS 代码的 windows 机器。

代码所在的 Linux 机器。

我用 VS 代码连接到 Linux 机器。

Linux机器上的git可以使用remove VS code作为编辑器吗?

找到这个链接,但它没有说明如何进行这样的配置: https://github.com/microsoft/vscode-remote-release/issues/933

这个链接也没有帮助我: https://github.com/roiderats/vscode-remote-remote

我从 VS 代码终端尝试了以下命令: git --mergetool -t "code --wait"但我得到以下 output: Unknown merge tool code --wait

我从 VS 代码终端尝试了以下操作: git config --global core.editor "code --wait" Git 尝试使用 vim 作为编辑器。

似乎我的错误是从 Linux 机器给出了 git difftool 或 git mergetool 命令导致错误: Unknown merge tool code --wait

解决方案:在 VS 代码中从终端发出 git difftool 或 git mergetool 命令。 届时它将起作用。

按照此链接进行设置: https://www.roboleary.net/vscode/2020/09/15/vscode-git.html

The default practice when working with Git 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.

当然,您可以在 Linux 端设置 SAMBA 共享,以在 Windows 机器上使用 VS Code 远程访问 Git-repo。

但这在最新的 git 客户端版本中是不受欢迎的,当不使用存储在您的用户配置文件中的克隆存储库时会向您发出警告~

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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