Search code examples
gitdockeratlassian-sourcetreewindows-subsystem-for-linux

Why is Git on WSL2 with SouceTree so slow for me?


My environment is as follows.

  • Windows10(version 2004, build 19041.572)
  • 64 bit OS
  • On WSL2, I use Ubuntu(Ubuntu-20.04)
  • I use git with SourceTree.

I use docker-compose to develop Web services. Running docker-compose on Windows is very slow for accessing web pages. I created a docker environment in the Ubuntu's Home folder on WSL2. Web site data (Laravel) is installed in the docker environment on WSL2 and managed by git.

How can i improve the speed of SourceTree on WSL2? Git on Windows is faster.


Solution

  • Unfortunately WSL2 has an issue with filesystem performance on /mnt.

    Might be an option to checkout your repo into container's /home, instead of /mnt/..., if you don't need to edit it from windows.

    Running Docker from a Linux container on windows will not help.

    UPD: The same issue can appear on a large project w/o mounting anything, but still accessing repo inside WSL by \\wsl$ path from Windows. The issue still open.