libgit2 ( is a portable, pure C implementation of the Git core methods.


Using libgit2 requires a good understanding of the way a Git repository is organized internally. We provide a a Git Internals tutorial that covers what is needed for this tutorial.


libgit2 is distributed in source form only. Distributions can be obtained from the download page at

Build instructions can be found at

The build system is based on CMake [1], a cross-platform, open-source build system. If you are not familiar with CMake don't worry: to build libgit2 you don't need to know much. Just install CMake and follow the build instructions. However if you want to know more about CMake we provide a CMake tutorial.

By default the build will produce a shared library. You'll have to put it in a location where it can be found by the operating system when launching an application that uses it.


  1. CMake

blog comments powered by Disqus

Copyright(c) 2006-2017 Xavier Leclercq | Privacy policy

Contact Us