• Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • Git
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      It would really be amazing to add support for WSL git. All of my current dev env is running through WSL, so not having access to WSL git makes development very difficult (pre-commit hooks require WSL env to run successfully).

      This is echoing the sentiment of SRCTREEWIN-6149

      I tried using gitwrap but that failed.

            [SRCTREEWIN-10956] Add support for WSL git on Windows

            pls?

            Orhan Altun added a comment - pls?

            +1 For the last year or more, Sourcetree for Windows has become intolerably slow doing just about anything on a repo that resides within a WSL instance. Even just staging a few files frequently takes about 30 seconds or more.

            Joshua Dannemann added a comment - +1 For the last year or more, Sourcetree for Windows has become intolerably slow doing just about anything on a repo that resides within a WSL instance. Even just staging a few files frequently takes about 30 seconds or more.

            +1 Please add support for wsl git on sourcetree

            Michele Sartor added a comment - +1 Please add support for wsl git on sourcetree

            Hello! We have a project that uses pre-commit and Black linting will execute fine, but when running the Prettier linting we receive the following error message:

            UNC paths are not supported. Defaulting to Windows directory

            And that directory, of course, does not exist.

             

            Any insight?

            Kris Cotten added a comment - Hello! We have a project that uses pre-commit and Black linting will execute fine, but when running the Prettier linting we receive the following error message: UNC paths are not supported. Defaulting to Windows directory And that directory, of course, does not exist.   Any insight?

            I have a medium/large size of PHP projects installed on WSL2. I use Source Tree to manage Git. However, it's suuuper slow. I'm not able to work on Source Tree. Any remedy? 

            Marcin Galaszewski added a comment - I have a medium/large size of PHP projects installed on WSL2. I use Source Tree to manage Git. However, it's suuuper slow. I'm not able to work on Source Tree. Any remedy? 

            Naotho added a comment -

            Thanks! 

            Naotho added a comment - Thanks! 

            This finally worked for me (C:\Users\your-user-directory\.gitconfig)

            [safe]
                directory = *

             

            Robert Rypuła added a comment - This finally worked for me (C:\Users\your-user-directory\.gitconfig) [safe]     directory = *  

            David added a comment - - edited

            A fix in Git version 2.35.2 causes errors in WSL paths.

            Error message

            'git status' failed with code 128: error: failed to get owner for '//wsl$/Ubuntu-22.04/home/ubuntu/project-name' fatal: unsafe repository

            Error cause

            The policy has been changed so that git only treats directories it owns as safe.
            But git on windows cannot verify ownership of wsl

            Resolution

            Method 1. Run Git command

            git config --global --add safe.directory '%(prefix)///wsl$/Ubuntu-20.04/home/ubuntu/project-name'

            Method 2. Add the following to the .gitconfig

            # .gitconfig
            [safe]
                directory = %(prefix)///wsl$/Ubuntu-22.04/home/ubuntu/project-name
            

            Reference

            Cannot access repos of wsl #14365

            David added a comment - - edited A fix in Git version 2.35.2 causes errors in WSL paths. Error message 'git status' failed with code 128: error: failed to get owner for '//wsl$/Ubuntu-22.04/home/ubuntu/project-name' fatal: unsafe repository Error cause The policy has been changed so that git only treats directories it owns as safe. But git on windows cannot verify ownership of wsl Resolution Method 1. Run Git command git config --global --add safe.directory '%(prefix)///wsl$/Ubuntu-20.04/home/ubuntu/project-name' Method 2. Add the following to the .gitconfig # .gitconfig [safe] directory = %(prefix)///wsl$/Ubuntu-22.04/home/ubuntu/project-name Reference Cannot access repos of wsl #14365

            +1, recently very often I have some error in Sourcetree that all repositories are gone and I need to again provide folders but they are still available but on WSL2. 

            Łukasz Byjoś added a comment - +1, recently very often I have some error in Sourcetree that all repositories are gone and I need to again provide folders but they are still available but on WSL2. 

            Michal Zitko added a comment - https://github.com/andy-5/wslgit works on Fork

              Unassigned Unassigned
              836d4344af7c andrew
              Votes:
              177 Vote for this issue
              Watchers:
              79 Start watching this issue

                Created:
                Updated: