There are a few different ways to deal with git submodules. I don’t quite understand what you’re up to, but see if it’s some of those options:
Create a submodule by specifying a particular branch in a remote repository
git submodule add -b <branch> [URL to Git repo]
git submodule init
Onde <branch> é a branch para onde você quer commitar o submodulo e a
[URL] é o caminho do repositório remoto.
Create a submodule from a repository folder
git init .
mkdir submodule
cd submodule
git init .
cd ..
git submodule add ./submodule submodule
I wrote "more verbose" to help understand what happens. You can add a folder as a local submodule and then push to the remote.