Skip to content

Git: Support WSL #9502

Description

@tianvan

qq 20160720033734

Activity

  1. joaomoreno commented on Jul 21, 2016

    @joaomoreno
    Contributor

    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.

  2. 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
  3. johnbwoodruff commented on Aug 6, 2016

    @johnbwoodruff

    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! :)

  4. johnbwoodruff commented on Aug 31, 2016

    @johnbwoodruff

    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.

  5. dalyIsaac commented on Sep 18, 2016

    @dalyIsaac

    +1

  6. ncarroll commented on Oct 12, 2016

    @ncarroll

    +1

  7. nmbradford commented on Oct 19, 2016

    @nmbradford

    +1

  8. jonomacd commented on Oct 31, 2016

    @jonomacd

    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.

  9. ElieMyIdea commented on Aug 24, 2017

    @ElieMyIdea

    +1

  10. andre2 commented on Aug 31, 2017

    @andre2

    +1

  11. 97 remaining items

  12. quhung1989 commented on Apr 2, 2019

    @quhung1989

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

  13. RMacfarlane commented on May 2, 2019

    @RMacfarlane

    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

  14. xty commented on May 3, 2019

    @xty
    Contributor

    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

    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🎉!

  15. benc-uk commented on May 3, 2019

    @benc-uk

    It automatically finds git from the WSL system path, no need to configure anything

  16. 12101111 commented on May 3, 2019

    @12101111

    With remote-wsl extension, vscode will use toolchains in wsl, but sometimes we just want to use git in wsl and continue to use the toolchain in Windows.
    图片

  17. andreialecu commented on May 3, 2019

    @andreialecu

    One probably helpful piece of information regarding the new Remote - WSL extension, 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 the File > 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.

  18. panoscool commented on May 3, 2019

    @panoscool

    Andrei Alecu (@andreialecu) if you open the project from wsl terminal using code . wsl Git is working right?

  19. andreialecu commented on May 6, 2019

    @andreialecu

    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 found
    

    Opened #73330

    EDIT: Actually, it does work if you have /c/Windows/System32 in 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.

  20. andreialecu commented on May 7, 2019

    @andreialecu

    My experience after a few days with Remote-WSL (valid May 2019):

    I went back to using wslgit on 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.

  21. aeschli commented on May 8, 2019

    @aeschli
    Contributor

    Thanks 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!

  22. locked and limited conversation to collaborators on Jun 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    WSLIssue when using WSLfeature-requestRequest for new features or functionalitygitGIT issueshelp wantedIssues identified as good community contribution opportunitiesverifiedVerification succeeded

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions