Write submodule settings to .gitmodules file.
This commits any in-memory changes to the submodule to the gitmodules
file on disk. You may also be interested in git_submodule_init()
which
writes submodule info to ".git/config" (which is better for local changes
to submodule settings) and/or git_submodule_sync()
which writes
settings about remotes to the actual submodule repository.
0 on success, < 0 on failure.