Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode 'Git Status' not same in WSL.exe (compared with powershell)

I switched the visual studio code terminal to the new built in Ubuntu bash shell via setting json entry...

"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\wsl.exe"

but when I typed git status is was not the same result as I see in the default powershell? so those are out of sync for some reason.

Should I file a bug? why would that be? what should one do? the UI seems not to see they are out of sync either.

like image 551
Master James Avatar asked Jul 08 '26 22:07

Master James


1 Answers

You're loading a different .gitconfig when running git in WSL. The .gitconfig is located in your home directory, in powershell this'd be C:\Users\My Name\.gitconfig and in WSL this would be /home/myname in your WSL, which is stored somewhere in a state folder in %localappdata%.

Check for differences between the .gitconfig files, you probably have line endings configured differently, like jessehouwing suggested in the comments.

like image 180
ikkentim Avatar answered Jul 12 '26 04:07

ikkentim