VSCode: git fatal error: file is outside directory

my vs code recently got updated to May 2020 release. Just after this the above git issue starting happening. So i rollback version of my vs code to April 2020 release and now again git extension works


I have got this problem after installing May 2020 VSCode update (v1.46).

After comparing git commands of the old and the new VSCode it appeared that updated VSCode uses low case drive letter in the path for the git command, but the old one used upper case letter. The ignorecase git option that should solve those problem was already set to true.

Updating git to version 2.27 solved the problem.


If you use ASCII / Special chars (like æøå) in your path name this error occurs. Rename your path names / directories to the fix issue.

Be aware all parent paths for your projects directory needs to be changed, not just your paths / directories within your project.


What fixed it for me was:

Being a Windows and VScode user, I fixed this by updating GIT. You do that by going to https://gitforwindows.org/ and installing.