libgit2.example.init

This is a sample program that is similar to "git init". See the documentation for that (try "git help init") to understand what this program is emulating.

This demonstrates using the libgit2 APIs to initialize a new repository.

This also contains a special additional option that regular "git init" does not support which is "--initial-commit" to make a first empty commit. That is demonstrated in the "create_initial_commit" helper function.

Members

Functions

lg2_init
int lg2_init(libgit2.types.git_repository* repo, int argc, char** argv)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Structs

init_opts
struct init_opts

Forward declarations of helpers

Meta