I agree with the above "Close Visual Studio" answers.
However, an additional step I had to do even after I'd closed Visual Studio was to manually kill the"devenv.exe" Visual Studio process in Task Explorer.After I had done this I was able to again run in gitbash:
git pull
and the "cannot stat filename" error disappeared. It is perhaps due to a Visual Studio extension keeping the process open for longer even after closing.