Git in Visual Studio is very slow for me. One of the things I try to fix this problem is to use the installed Git for Windows. Process Monitor shows Visual Studio keeps using the included Git version. My PATH variable contains
C:\Program Files (x86)\Git\cmd;
but not
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin\git.exe
In Visual Studio External Web Tools options I pointed the previous two Git paths to their Git on Windows equivalent.
I'm using the following versions:
Instead of a full Git for Windows install, VS includes a MinGit install. MinGit is an official subset of the Git for Windows distribution and is available for download alongside the Git for Windows installers.
VS does this for several reasons. One reason to bundle MinGit is for reliable and predictable behavior. VS needs to parse the output of various Git commands, and not all commands have porcelain output available. That output changes from time to time, and the parsers have to be updated. By including MinGit, VS can verify the behavior of the commands it uses before each release. As an example, this happened with the 2.16 release of MinGit, which brought output changes in a handful of commands that we'll need to handle before moving to that version. Deleting the MinGit copy included with VS may break the Git integration.
A secondary reason is to cut down on the Git for Windows install size since it is several hundred megabytes. MinGit is under 50 megabytes.
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