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 .
None of the above worked for me.
Updating Git fixed the problem.