Existing issues matching what you're seeing
Git for Windows version
git version 2.55.0.windows.3
cpu: x86_64
built from commit: 52ca1113d651127f89477a8763f86ab20f645e1d
sizeof-long: 4
sizeof-size_t: 8
shell-path: D:/git-sdk-64/usr/bin/sh
rust: disabled
feature: fsmonitor--daemon
gettext: enabled
libcurl: 8.21.0
OpenSSL: OpenSSL 3.5.7 9 Jun 2026
zlib: 1.3.2
SHA-1: SHA1_DC
SHA-256: SHA256_BLK
default-ref-format: files
default-hash: sha1
Windows version
Windows 10
Windows CPU architecture
x86_64 (64-bit)
Additional Windows version information
Microsoft Windows [Version 10.0.19045.6466]
Options set during installation
Editor Option: VIM
Custom Editor Path:
Default Branch Option:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: WinSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Merge
Use Credential Manager: Enabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
Add Mandatory ASLR security exceptions: Disabled
Enable FSMonitor: Disabled
Other interesting things
I found several older reports with similar symptoms, including #4446, #4419, #2872, #2282 and #1331.
However, this report includes a minimal standalone reproduction and testing across multiple installed and PortableGit versions, including x64 and x86 builds, after a Windows clean boot and other system-level troubleshooting.
Troubleshooting already performed
The following have been tested without resolving the issue:
- Updated Git for Windows to 2.55.0.windows.3.
- Rebooted Windows multiple times.
- Tested outside VS Code.
- Tested outside any Git repository.
- Tested the bundled sh.exe directly.
- Tested separate PortableGit installations.
- Tested Git for Windows versions 2.55.0.3, 2.50.1 and 2.30.0.
- Performed a Windows clean boot with non-Microsoft services and startup applications disabled.
- Temporarily disabled Microsoft Defender real-time monitoring.
- Checked Windows Exploit Protection; no application-specific rules exist for sh.exe, bash.exe, or git.exe.
- Removed Avast using the official Avast cleanup utility.
- Stopped Dropbox and its DbxSvc service.
- Ran DISM and SFC.
DISM results:
- No component store corruption detected.
- The restore operation completed successfully.
SFC result:
- Windows Resource Protection did not find any integrity violations.
No corresponding application crash event is recorded in the Windows Application event log.
Additional context
The issue was initially noticed because a Git post-commit hook failed. However, the minimal standalone sh.exe test proves that the hook and the application executed by the hook are not the cause.
Normal Git operations that do not require MSYS shell process forking can still succeed. For example, the Git commit itself was created successfully, but the shell-based post-commit hook failed afterwards.
Because multiple isolated PortableGit versions fail in the same way, this appears to be a machine- or Windows-specific interaction with the MSYS2 runtime rather than corruption of a single Git installation.
Please let me know what additional diagnostic output would be useful, such as:
- Process Monitor trace
- loaded module list
- fltmc filters output
- Windows process mitigation configuration
- MSYS2 runtime debug output
- crash dump of a failed child sh.exe
systeminfo.txt
Loaded filesystem minifilters after reboot / clean boot.
fltmc-filters.txt
The attached process-mitigations.txt contains the system-wide mitigation defaults.
I also manually verified in Windows Security that no application-specific
Exploit Protection entries exist for sh.exe, bash.exe, or git.exe.
process-mitigations.txt
git-msys-fork-error.txt
Terminal/shell
PowerShell
Commands that trigger the issue
Git for Windows' bundled MSYS2 shell cannot fork child processes on my Windows 10 machine.
The problem is reproducible independently of Git repositories, hooks, VS Code, Python, or any third-party Git integration.
Even this minimal command fails:
powershell
& "C:\Program Files\Git\usr\bin\sh.exe" -lc 'echo parent; (echo child); echo success'
Steps to reproduce
1. Open Windows PowerShell.
2. Run:
& "C:\Program Files\Git\usr\bin\sh.exe" -lc 'echo parent; (echo child); echo success'
Expected behaviour
parent
child
success
Actual behaviour
Typical output:
0 [main] sh 108 dofork: child -1 - forked process 10260 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
/etc/msystem.d/MSYS: fork: retry: Resource temporarily unavailable
...
/etc/msystem.d/MSYS: fork: Resource temporarily unavailable
Sometimes the first child process instead fails with:
child_copy: dll data read copy failed, 0x1127000..0x1140CB0, done 0, windows pid 11436, Win32 error 299
dofork: child -1 - forked process 11436 died unexpectedly, retry 0, exit code 0xC0000005, errno 11
Actual result
The child shell process fails during fork() with combinations of:
exit code 0xC0000142
exit code 0xC0000005
errno 11
Win32 error 299
Resource temporarily unavailable
child_copy: dll data read copy failed
Repository
No response
Existing issues matching what you're seeing
Git for Windows version
Windows version
Windows 10
Windows CPU architecture
x86_64 (64-bit)
Additional Windows version information
Options set during installation
Editor Option: VIM Custom Editor Path: Default Branch Option: Path Option: Cmd SSH Option: OpenSSH Tortoise Option: false CURL Option: WinSSL CRLF Option: CRLFAlways Bash Terminal Option: MinTTY Git Pull Behavior Option: Merge Use Credential Manager: Enabled Performance Tweaks FSCache: Enabled Enable Symlinks: Disabled Add Mandatory ASLR security exceptions: Disabled Enable FSMonitor: DisabledOther interesting things
I found several older reports with similar symptoms, including #4446, #4419, #2872, #2282 and #1331.
However, this report includes a minimal standalone reproduction and testing across multiple installed and PortableGit versions, including x64 and x86 builds, after a Windows clean boot and other system-level troubleshooting.
Troubleshooting already performed
The following have been tested without resolving the issue:
DISM results:
SFC result:
No corresponding application crash event is recorded in the Windows Application event log.
Additional context
The issue was initially noticed because a Git post-commit hook failed. However, the minimal standalone sh.exe test proves that the hook and the application executed by the hook are not the cause.
Normal Git operations that do not require MSYS shell process forking can still succeed. For example, the Git commit itself was created successfully, but the shell-based post-commit hook failed afterwards.
Because multiple isolated PortableGit versions fail in the same way, this appears to be a machine- or Windows-specific interaction with the MSYS2 runtime rather than corruption of a single Git installation.
Please let me know what additional diagnostic output would be useful, such as:
systeminfo.txt
Loaded filesystem minifilters after reboot / clean boot.
fltmc-filters.txt
The attached
process-mitigations.txtcontains the system-wide mitigation defaults.I also manually verified in Windows Security that no application-specific
Exploit Protection entries exist for
sh.exe,bash.exe, orgit.exe.process-mitigations.txt
git-msys-fork-error.txt
Terminal/shell
PowerShell
Commands that trigger the issue
Expected behaviour
parent
child
success
Actual behaviour
Typical output:
Sometimes the first child process instead fails with:
Actual result
The child shell process fails during fork() with combinations of:
Repository
No response