Git toggled folders as submodules!?

Few days ago, i had to struggle with a strange scenario in which git began tracking a folder, as if it was a submodule.

Now, what’s strange with that?: i didn’t set any submodules!. My .gitmodule file was empty (in fact, i didn’t even have that file).

Thanks to this stackflow question, i ended up figuring out this solution:

git ls-files --stage | grep 160000
git rm --cached [Paths retrieved from the command above]

Hopefully, this will help another lost soul!