We have a very large project with almost 15.000 commits total. I run Debian 9.3
on my Windows machine using WSL. My git version is 2.17.0
.
When I run commands such as git status
, it takes at least 20 seconds to complete. Even if no changes were made.
I have tried multiple older versions of git and even tried Ubuntu, but I still experience the same result. I've tried running a bunch of commands from various posts on here and on other sites, but none of them worked.
Funny thing: When I open up cmd.exe
or Git Bash on Windows, it takes less than a second to run git status
.
What could be causing this? What can I do to fix this?
To execute Git commands on your computer, you must open a terminal (also known as command prompt, command shell, and command line).
All you have to do is load Command Prompt (Load the Start menu, then click "Run", type cmd and hit enter), then you can use Git commands as normal.
Installing Git The Git package is included in the Debian's default repositories and can be installed using the apt package manager.
Update June 2019: WSL 2 is coming, and with it a full system call compatibility.
That should increase Git command performance considerably!
Original answer 2018:
Git is working best when executed on a host without any intermediate layer.
For instance, if your repo is on a shared folder, Git would be considerably slower.
In case of WSL, the repo is locally accessed, but through through a filesystem translation between various Linux file system operations into NT kernel operations.
That would be enough to explain degraded performance, especially on large Git repositories Plus make sure your $PATH
does not reference folders with Windows executable that might be called instead of the Linux ones
Possible causes:
PS1
computationIf 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