I do have Git Bash installed (WSL2 is still very slow on large git repos like llvm and webkit). in WSL2 Ubuntu 20.04:
matt@Surface2:/mnt/c/Users/matt/src/roact-alignment$ git --version
git version 2.25.1
in cmd:
C:\Users\matt>git --version
git version 2.33.0.windows.1
even when no cmd is opened, I was getting this for git operations:
matt@Surface2:/mnt/c/Users/matt/src/roact-alignment$ git pull
error: bad fsmonitor version 2
error: bad fsmonitor version 2
I solved this problem by upgrading git.
# Add ppa of git
sudo add-apt-repository ppa:git-core/ppa
# Update sources
sudo apt update
# Upgrade git
sudo apt upgrade
more details, see this Page
I think in newer VS Code, it has the win32 git client running. It appears that the linux git client connects to the win32 fsmonitor "service" somehow.
The solution was to update the version of git in WSL2 to be closer to the git.exe that was installed with Git Bash and/or Visual Studio Code.
I followed the instructions to add the updated git releases PPA for Ubuntu here: https://git-scm.com/download/linux
and the messages went away!
fixed by upgrade git to 2.36.1 in WSL2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With