Vscode integrated terminal working differently than Linux terminal with git

Viewed 123

I am running into weird issue with Vscode integrated terminal. It cannot find a git repository, while my normal linux terminal finds it perfectly fine.

Below image clearly tells the problem. What might be the issue here? enter image description here

2 Answers

I have had a few strange issues with VSCode git integration versus working in the integrated terminal.

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. See my question here: Why do I get a different git status in a shared folder when logged in on a local VM?

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. 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

Related