简体   繁体   English

Vscode 集成终端与 Linux 终端与 git 的工作方式不同

[英]Vscode integrated terminal working differently than Linux terminal with git

I am running into weird issue with Vscode integrated terminal.我在使用 Vscode 集成终端时遇到了奇怪的问题。 It cannot find a git repository, while my normal linux terminal finds it perfectly fine.它找不到 git 存储库,而我的普通 linux 终端发现它非常好。

Below image clearly tells the problem.下图清楚地说明了问题。 What might be the issue here?这里可能是什么问题? 在此处输入图像描述

I have had a few strange issues with VSCode git integration versus working in the integrated terminal. VSCode git 集成与在集成终端中工作相比,我遇到了一些奇怪的问题。

For example, sometimes the git integration in VSCode and and in the terminal disagree with each other, and sometimes the terminal's history is apparently corrupted by VS Code.例如,有时 VSCode 和终端中的 git 集成相互不一致,有时终端的历史显然被 VS Code 破坏。 See my question here: Why do I get a different git status in a shared folder when logged in on a local VM?请在此处查看我的问题: 登录本地 VM 时,为什么我会在共享文件夹中获得不同的 git 状态?

I haven't entirely sorted out why this occurs, so I can't guarantee that it is the same problem as you are finding, but it could be related.我还没有完全弄清楚为什么会发生这种情况,所以我不能保证它和你发现的问题一样,但它可能是相关的。

I had the same issue and what worked for me is to disable Git: Terminal Authentication in the settings.我遇到了同样的问题,对我有用的是在设置中禁用Git: Terminal Authentication It will prompt the username and the password in the terminal.它会在终端提示用户名和密码。 Hope that this solution/workaround is good for other people.希望这个解决方案/解决方法对其他人有好处。

From this site I found this solution/workaround: https://github.com/microsoft/vscode/issues/136970从这个站点我找到了这个解决方案/解决方法: https://github.com/microsoft/vscode/issues/136970

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

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