【git在window11操作很慢,占用很大cpu,最后也执行失败】
在谷歌输入:git very slow in window 11。通过下面链接终于找到了解决方案:
https://www.reddit.com/r/vscode/comments/sulebx/slow_git_in_wsl_after_updating_to_windows_11/
https://github.com/microsoft/WSL/issues/4585
解决方案:
以管理员身份打开window powershell终端,执行下面命令即可:
New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL)" -Action Allow