I ran into this error, and found very little documentation on how to fix it online. I got the error by trying to run the command git add ., and received this re
git add .
To solve the problem, I removed the file from git, then re-added it by doing the following:
git rm "myPathToAFile"
git commit -am 'my commit'
Hope this helps someone else!