libgit2

git_submodule_save

Version:

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.

Signature

int git_submodule_save(git_submodule *submodule);

Parameters

In
submodule

The submodule to write.

Returns

int

0 on success, < 0 on failure.

Versions