Visual Studio Code (Vscode) Git Treats A Folder Like It Is A File

Look for .git folders

Published: 29 July 2022

It often happens if you copy and paste folders and files into an existing repository.

Most likely the cause is the presence of a .git folder in one of the sub-folders of your repository.

Removing the unwanted .git folder should resolve the problem.

Thanks for reading to the end! 🎉

I’m Luca, I help build products and grow people's businesses.

Follow me on Twitter if you’d like to stay in touch—DMs are open ✉️

In the footer you'll find other places where I usually hang out.