Go to sub-folder of your git-folder where you want to put new sub-module and execute
$ git submodule add git_repository_url directory_name
Make sure that directory name does not contain dashes.
Updating sub-modules from command line
$ git submodule foreach git pull
or by TortoiseGit
It can be useful if you don’t want to store some sensitive information like logins in repository.
Add clean version of the file to GIT as usual. Commit it.
Start commit by TortoiseGit, right click the file and select “Skip worktree”.
Repeat this for every branch which contains the file (over fresh checkout of branch).