'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 1:[1]

My solution is to use git tasks/command inside the IDE that supports WSL.

I use Visual Studio Code inside WSL 2 and use git extensions to do git tasks/commands. The performance is superb! :-D

Solution 2:[2]

I know link-only answers are frowned upon, but I found this: https://gist.github.com/jasonboukheir/3fdab92ece236744528447a4f7f5de00

It's a clever, if somewhat kludgy solution, whereby you end up using WSL git for Linux-y paths, and Windows git for Windows-y paths.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 nelsonym
Solution 2 Edd Inglis