You must remove the gitlink entry in your index:
mv subfolder subfolder_tmp
git submodule deinit subfolder
git rm --cached subfolder
mv subfolder_tmp subfolder
git add subfolder
Replace subfolder with the name of the folder for your submodule, and make sure to not add any trailing slash.
This is what I detail in "Remove a Git submodule?" and "un-submodule a git submodule".
The --cached option allows you to keep the subfolder content in your disk... except git submodule deinit would already have removed that content anyway. Hence the mv part.
You then can add and commit that subfolder.