Error reported in vscode after installing Git

After installing git, an error is reported in vscode that git cannot be found:

Find git in C:/program files/git/bin/git.exe

Find git in C: \ program files \ git \ CMD \ git.exe

Find git in C: \ program files (x86) \ git \ CMD \ git.exe

Find git in C: \ program files \ git \ CMD \ git.exe

Find git in C: \ users \ administrator \ appdata \ local \ programs \ git \ CMD \ git.exe

Git installation not found.

 

Then find the GIT directory and open the two files:

Enter git — version in CMD, and the same error will be reported:

Microsoft Windows [version 10.0.16299.15]

(c) 2017 Microsoft Corporation。 All rights reserved

  C:\windows\system32> git -version

fatal: open /dev/null or dup failed: No such file or directory

Solution:

The reason I found it on the Internet is that there is a problem with the null.sys file under C: \ windows \ system32 \ drivers, so I found another null.sys on the network disk to replace the original one, and then restart the computer

Network disk address of null.sys https://pan.baidu.com/s/1kwKmnHSBjfonHUFenveXAA (it can also be found in my network disk – related GIT). Of course, this solution is limited to win10

(also, the command used to check the GIT version is: git — version, with two bars)

Similar Posts: