libgit2 is a portable, pure C implementation of the Git core methods provided as a re-entrant linkable library with a solid API.