Visual Studio can’t use git-lfs properly
I’ve had this issue with git-lfs git-hooks failing to spawn processes for months:
15563255 [main] sh 1473 dofork: child -1 - forked process 50444 died unexpectedly, retry 0, exit code 0xC0000142, errno 11 .git/hooks/pre-push: fork: Resource temporarily unavailable
Initially, this was caused by Microsoft Defender for Windows. And I resolved it by adding C:\Program Files\Git to the exclusions list:
Add-MpPreference -ExclusionPath “C:\Program Files\Git”
That fixed it for a while. But then it came back. After messing with exclusion rules, paths, and copying files around so that all git.exe’s installed on my system had a git-lfs.exe available to them. I decided to just reinstall all git applications. And that fixed the issue.