I am following the link you provided and doing the steps, but I ge this error when trying to add again the submodule:
fatal: 'themes/DoIt' already exists in the index
I solved it by following this stackexchange question using git rm -r --cached projectfolder
and then removing the directory of the theme with rm -rf themes/DoIt
.
I then continue to follow the instruction from your linked, and it was all good. Thank you.