The following example demonstrates how to add files with libgit2.
Argument-processing helper structure
This example demonstrates how to invoke the libgit2 blame API to roughly simulate the output of git blame and a few of its command line arguments.
The following example demonstrates how to do checkouts with libgit2.
This example demonstrates the libgit2 commit APIs to roughly simulate git commit with the commit message argument.
The following example partially reimplements the git describe command and some of its options.
This example demonstrates the use of the libgit2 diff APIs to create libgit2.diff.git_diff objects and display them, emulating a number of core Git diff command line options.
[**libgit2**]lg is a portable, pure C implementation of the Git core methods provided as a re-entrant linkable library with a solid API, allowing you to write native speed custom Git applications in any language which supports C bindings.
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 part is not strictly libgit2-dependent, but you can use this as a starting point for a git-like tool
This example demonstrates the libgit2 rev walker APIs to roughly simulate the output of git log and a few of command line arguments. git log has many many options and this only shows a few of them.
This example demonstrates the libgit2 index APIs to roughly simulate the output of git ls-files. git ls-files has many options and this currently does not show them.
The following example demonstrates how to do merges with libgit2.
This example demonstrates the libgit2 push API to roughly simulate git push.
This is a sample program that is similar to "git remote". See the documentation for that (try "git help remote") to understand what this program is emulating.
This example demonstrates the use of the libgit2 status APIs, particularly the libgit2.types.git_status_list object, to roughly simulate the output of running git status. It serves as a simple example of using those APIs to get basic status information.
The following example partially reimplements the git tag command and some of its options.