fix: Git Slow On Windows
git on my Windows machine was reheheally slow when running commands such as git diff and git log, but only when I had network connectivity. If I removed my network connection it was fast again
¯\(ツ)/¯. I couldn’t figure it out, but found some stack overflow post with a fix which solved it for me.
click start
type "git bash"
right click icon, left click "Run as administrator"
# get current user entry and cache it in /etc/passwd
mkpasswd -c > /etc/passwd
# Set home directory to existing directory /c/Users/<your-username>
vim /etc/passwd
# edit nsswitch and comment out "db" to prevent accessing Microsoft AD
vim /etc/nsswitch.conf
passwd: files # db
group: files # db
Profit.