I have a project with a submodule set up. A colleague by accident deleted the target folder and made a symlink instead (pointing outside the project folder), committing it.
Now I'm not able to restore the submodule anymore, even after deleting the link and creating an empty directory. .gitmodule and .git/config haven't changed. git submodule add and git submodule init don't do anything.
I can't revert the problematic commit, because it also contains a lot of other changes.
How can this be fixed?