# libgit2

A cross-platform, linkable library implementation of Git that you can use in your application.

Repository: https://github.com/libgit2/libgit2
Canonical: https://ross.abutalabs.com/products/libgit2
Homepage: https://www.libgit2.org
Language: C
License: NOASSERTION
License Family: other
Topics: libgit2, git, library, dvcs, version-control, c
Last push: 2026-08-15T12:37:11+00:00
Link (homepage): https://www.libgit2.org
Link (site_page): https://libgit2.org/docs/reference
Link (site_page): https://libgit2.org/docs

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 97, longevity 100
- inputs: {"age_days": 5836, "days_push": 18, "days_rel": 20, "gap_med": 17, "n_releases_24m": 14}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 10575, forks 2643 (observed 2026-08-28T04:10:42.398357+00:00)

## What it is
libgit2 is a portable, pure C implementation of Git's core methods provided as a re-entrant linkable library with a solid API. It can be embedded directly in applications or accessed from many languages through official bindings such as pygit2, Rugged, LibGit2Sharp, git2go, and objective-git.

## Use cases
- embed git functionality in my application without shelling out to the git binary
- read and write git repositories from python
- build a gui git client
- implement git hosting or forge features programmatically
- manipulate commits, branches, and diffs from .net or ruby
- clone and inspect repositories programmatically

## When to choose
- you need git operations embedded in a C, C++, or bound-language application
- you want a permissive license (GPLv2 with linking exception) for proprietary software
- you need cross-platform git support on Linux, macOS, iOS, or Windows
- spawning the git CLI is undesirable or unavailable in your environment

## When to avoid
- you just need a command-line git tool for everyday use
- you want a high-level scripting tool rather than a library to link against
- you need the absolute latest git features immediately, as libgit2 can lag the git CLI

## Facets
- artifact type: library
- maturity: stable
- function: version-control, sdk, developer-tools
- domain: version-control, developer-tools, cross-platform
- platform: windows, cross-platform, c
- tags: git, dvcs, c-library, ffi-bindings, linkable-library, linux, macos, ios

## Member repositories
- libgit2/libgit2 (main) score 98
- libgit2/libgit2sharp (sdk) score 84
- libgit2/rugged (sdk) score 65
- libgit2/git2go (sdk) score 23
- libgit2/pygit2 (sdk) score 94
- libgit2/objective-git (sdk) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:42.398357+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:18:31.204189+00:00, confidence not recorded.
  - readme: https://github.com/libgit2/libgit2 (fetched 2026-08-28T04:10:42.398357+00:00, sha a3a974b4c56a)
  - homepage: https://www.libgit2.org (fetched 2026-08-29T08:17:44.842672+00:00, sha cc634028b34c)
  - site_page: https://libgit2.org/docs/reference (fetched 2026-08-29T08:17:44.852102+00:00, sha 9c87109cb8f3)
  - site_page: https://libgit2.org/docs (fetched 2026-08-29T08:17:44.854397+00:00, sha 5b7d58fa9fbf)
- Data as of 2026-08-30T08:39:29.467469+00:00.
