Repository navigation
Git: Support WSL #9502
Description

Activity
- addedfeature-requestRequest for new features or functionalityRequest for new features or functionality
on Jul 20, 2016 This was fast. The thing literally came out yesterday for everyone.Actually, it's still not yet out, so support for this will take its time.
- changed the title
[-]Only support Git for Windows,Please support Git for Bash on Ubuntu on Windows [/-][+]Support Git for Bash on Ubuntu on Windows [/+]on Jul 21, 2016 It would be great to use Bash on Ubuntu on Windows as the integrated terminal! Not to mention its git installation for the git tab. I can't +1 this enough! :)
Noticed that we can use the Bash on Ubuntu on Windows terminal in the integrated terminal now. That's awesome! Now we just need the git integration with the git version installed through bash on ubuntu on windows.
Reacted by Frank Lin, evlad, Eduardo Justi, Hsiao-Chieh Tsai, 椰格, Mohammed, Erez Korn, Jed, Bernhard Döbler, John Dugan and 17 more+1
+1
+1
- addedhelp wantedIssues identified as good community contribution opportunitiesIssues identified as good community contribution opportunities
on Oct 20, 2016 This would be great not just for git but for extensions as well. I use the vscode-go extension and it shells out to use the command line tools often. I'd like it if it could shell out to bash as opposed to windows terminal. It would also need access to environment variables from bash. Basically, I want it to think it is in a bash environment even though it is in windows.
Thanks.
Reacted by Alan, Benjamin Talmard, Leandro Osorio, Adam Vigneaux, Dusty Phillips and Adam Hoelscher, ASA, MAAA+1
+1
97 remaining items
Lavdimir K. (@panoscool) This is what I did to resolve the side bar issue. I opened "Git Bash" in Windows and and ran:
git config --global core.excludesfile '/the/absolute/path/to/your/global/git/ignore'
So currently Git Bash and WSL are referencing the same ignore file globally. I was not sure how Git Bash handles absolute paths so I did "cd ~" and "$PWD" and it returned "/c/Users/username".
Reacted by Lavdimir K. and Levi TomesWe just announced remote development with VS Code, check out the blog post for details https://code.visualstudio.com/blogs/2019/05/02/remote-development
Reacted by Alexander Kavanaugh, wmzy, XTY, Adam Plowman, Lavdimir K., Matt Mirus, Nimbly and AMS777Reacted by Alexander Kavanaugh, Kai Li, Pete Davison, Lavdimir K., Matt Mirus and Jordy SchreudersReacted by Alexander Kavanaugh, ameft, Lavdimir K. and NimblyReacted by Alexander KavanaughWe just announced remote development with VS Code, check out the blog post for details https://code.visualstudio.com/blogs/2019/05/02/remote-development
Rachel Macfarlane (@RMacfarlane) Thank you for the heads-up. It really looks great! I have one question though:
Now with the Visual Studio Code Remote - WSL extension in action, will VS Code automatically pick up the Git installation in WSL or do we have to manually configure"git.path"in the WSL specific settings?Update [2019/05/03]: Upon investigation, it appears Git installation in WSL is picked up automatically. This is awesome🎉!
Reacted by Christian Grimberg, XTY and Aditya DuttIt automatically finds git from the WSL system path, no need to configure anything
Reacted by Christian Grimberg, Aditya Dutt and NimblyOne probably helpful piece of information regarding the new
Remote - WSLextension, which I needed to do in my project:If you open your folder from the windows path, like you used to - such as from your recent projects menu, the extension won't kick in - everything will still be in Windows mode.
What I had to do was to use
Remote-WSL: Open Window, then theFile > Open Folder...menu will show you Linux paths, so you need to browse for your folder from there (/mnt/...) and open that instead.After doing this the git used by Code will be the native one from WSL, and your terminal windows will also use bash by default.
Reacted by Aditya Dutt, Ricardo Amaral and Firat AtalayAndrei Alecu (@andreialecu) if you open the project from wsl terminal using code . wsl Git is working right?
Lavdimir K. (@panoscool)
code-insiders .doesn't seem to work properly from the WSL terminal. It still opens via the Windows path, meaning the extension doesn't kick in - so you don't get WSL Git or any other WSL capabilities.It also prints an error to the console, which
code .doesn't:$ code-insiders . /c/Users/<snip>/AppData/Local/Programs/Microsoft VS Code Insiders/bin/code-insiders: line 29: cmd.exe: command not foundOpened #73330
EDIT: Actually, it does work if you have
/c/Windows/System32in your PATH (which would be there by default), but I disabled Windows path propagation into WSL. I posted a workaround in the issue opened above.My experience after a few days with Remote-WSL (valid May 2019):
I went back to using
wslgiton stable Code. While Remote-WSL is extremely promising, I kept running into file system issues, such as various EACCES errors, and even hard lockups because of the NTFS<->WSL file access issues and VS Code was exacerbating them as well.One example (using React Native) was weird lockups of the Android emulator in Android Studio that could only be resolved by a computer reboot. Additionally, Android Studio would rarely build the project without complaining about being unable to replace some file because of access denied issues. Had to randomly close/reopen Code to try to get past these errors.
One other annoying thing for example is that you are unable to rename a directory after opening it via Remote-WSL. It's a known limitation, among others listed here: https://code.visualstudio.com/docs/remote/wsl#_common-limitations-in-wsl
These will all likely be resolved once WSL 2.0, which was just announced, goes live. It should hit the Windows Insider channel in late June: https://devblogs.microsoft.com/commandline/announcing-wsl-2/
In the mean time,
wslgit, while it has its quirks, is currently less of a hindrance to work with.Reacted by NimblyReacted by Jordy SchreudersThanks for the feedback, Andrei Alecu (@andreialecu). Yes, the fs locking issues are nasty. As you said, they will only go away with the VM2 mode. In some cases you can work around the issue by defining watcher excludes ('files.watcherExclude") for folders where other tools work (e.g. node_modules...)
For the cmd issue you created microsoft/vscode-remote-release#170, thanks!
Reacted by Andrei Alecu- addedverifiedVerification succeededVerification succeeded
on May 8, 2019 - locked and limited conversation to collaborators
on Jun 16, 2019
