I solved by first removing the folder MyFolder
which is converted to submodule by git tower (I committed XYZ
though).
git rm --cached path/to/submodule
rm -rf path/to/submodule
Then adding MyFolder
to XYZ
again and committing solved the problem.
cd path/to/XYZ
git add MyFolder/
git commit -m "Added MyFolder" MyFolder/