remote vscode无git_Git无法与vscode Remote ssh一起正常工作

I recently tried out vscode's remote SSH feature. It was super easy to setup and connect to a remote server.

I opened the editor to a directory that is a git repo and expected to have the default git features working like normal. But if I edit a file, vscode isn't showing the visual indication that there is a modification in the file. And the git tab doesn't show the change. I can open the terminal in vscode and run git status and I do in fact see the change so I know that's actually editing the file.

If I ssh into the server and run git status I do notice that vscode updates and now shows the change in the git tab. But there's still no visual indication next to the line number in the actual file that is changed.

解决方案

Turns out my problem was that I was opening VSCode to a symlinked directory on the remote server. If I instead pointed it to the actual directory everything worked fine!

@depontimatteo's answer might still be relevant if someone is running into this problem with a large codebase.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值