Initializing a git repo in dir2( cd dir2; git init) does not make a dir2submodule.
Just create a dir2nested repo that will be ignored by any parent repo.
Removing dir2means that you have no direct way to retrieve its contents.
git submodule add /another/path/dir2, dir2 dir1.
dir2.