libgit2 is a portable, pure C implementation of the Git core methods provided as a re-entrant linkable library, with an API that's designed to be ergonomic to use from C directly, or from another language through FFI bindings.
Linux, macOS, iOS, and Windows are fully tested and supported.
Written in a well-supported subset of C99. Builds in GCC, Clang and MSVC.
libgit2 prefers system libraries, but offers minimal bundled dependencies where sensible.
GPLv2 with a Linking Exception that lets you use it with open or proprietary software.