I accidentally bumped into the same problem when I was sorting out the services running on my computer with Windows 10.
fatal: open /dev/null or dup failed: No such file or directory
The reason was that I deleted the service named 'Null'
that had no description as I thought that was a virus service.

Thus, when I found my git
unable to operate, I reckoned the deleted service.
According to a solution provided on some site I tried to run the service again using cmd.exe
sc config Null start= system
sc start Null
but it said the service hadn't been existed in the list.
Thankfully, there are some kind folks who shares the information of the default services running on Windows 10 and the description necessary for the successful bringing back the service.
So as to get the service back in the list:
- press
Win + R
- type
regedit
- go to
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services
section
- Create
Null
folder and all the params it needs.

- Restart your computer.
- Now you got your Null service back and your git back as well.

Hope this helps.