-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Git: Support WSL #9502
Comments
Actually, it's still not yet out, so support for this will take its time. |
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. |
+1 |
+1 |
1 similar comment
+1 |
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. |
+1 |
6 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 :) |
+1 |
@joaomoreno Wanted to check if there any work being done on this WSL git + VSCode integration? |
Keep in mind if you go with the |
@joaomoreno is a native integration in VSC planned? |
It's 2019.. It's been about 3 years since this issue was brought up... We see no progress at all.Git with vscode is the only reason I am in linux.. using wsl and git for windows together causes some crazy problems like losing permissions on some folders/files. So please vscode guys do something. |
I know it's not a permanent solution but if you haven't tried wslgit with vscode, give it a shot. It's stable and performs quite well for me. |
Well I think a heads up would be good. Is it being worked on? Can we contribute or test? Don’t leave us in the dark 🙂 |
@phifa I think @mmirus is referring to https://github.com/andy-5/wslgit which is an unofficial workaround. Edit: Some have reported that it's quite slow compared to using Git for Windows, so I still prefer to have both Git for Windows and WSL installed. Only downside is that I have to ensure my SSH keys and .gitconfig are replicated. Would obviously prefer to stop using Git for Windows though! |
wslgit is slow as hell and it's a cludgy workaround. Also SCM/git is just one part of the WSL integration we need from VSCode |
WSL & Git & Visual Studio Code without Git Bash |
@joaomoreno any updates on this? |
Any update on this? |
wslgit is not slow at all in my experience if set up properly. Just remember to set the |
the integrated terminal is working fine with the wsl the issue is the vscode git sidebar is not working at all with the wsl |
@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". |
We just announced remote development with VS Code, check out the blog post for details https://code.visualstudio.com/blogs/2019/05/02/remote-development |
@RMacfarlane Thank you for the heads-up. It really looks great! I have one question though: Update [2019/05/03]: Upon investigation, it appears Git installation in WSL is picked up automatically. This is awesome🎉! |
It automatically finds git from the WSL system path, no need to configure anything |
One probably helpful piece of information regarding the new 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 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. |
@andreialecu if you open the project from wsl terminal using code . wsl Git is working right? |
@panoscool It also prints an error to the console, which
Opened #73330 EDIT: Actually, it does work if you have |
My experience after a few days with Remote-WSL (valid May 2019):I went back to using 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, |
Thanks for the feedback, @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! |
By default, VS Code makes use of Git installed under Windows which causes changes to the file permissions even though WSL mounts the linux filesystem with its own file permissions. andy-5/wslgit forwards all arguments to git running in WSL: https://github.com/andy-5/wslgit Just a few days ago, Microsoft announced that they are working on Remote Development using VS Code which, together with WSL 2.0 which is scheduled to be released in June of this year dramatically improves working on source code that lives under WSL or inside a container. Awesome stuff! microsoft/vscode#9502 (comment) As with any new technology, it is not without bugs so it is worth waiting a little while longer before adopting as the comment below points out: microsoft/vscode#9502 (comment)
The text was updated successfully, but these errors were encountered: