簡體   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