An error shows in the Jenkins' project console as:
ERROR: Workspace has a .git repository, but it appears to be corrupt. hudson.plugins.git.GitException: Command "C:\Program Files (x86)\Git\cmd\git.exe rev-parse --is-inside-work-tree" returned status code 128: stdout: stderr: fatal: bad config file line 1 in .git/config
failed to fetch the code from the remote git repository.
Solution:
Copy config file from another local git repository for the same remote git repository.