first to the submodule you want to add, git init, add remote and pushgo back to the parent folder, git submodule add ./your_submodule