libgit2

Install command:
brew install libgit2

Also known as: libgit2@1.9

C library of Git core methods that is re-entrant and linkable

https://libgit2.org/

License: GPL-2.0-only WITH GCC-exception-2.0

Development: Pull requests

Formula JSON API: /api/formula/libgit2.json

Formula code: libgit2.rb on GitHub

Bottle (binary package) installation support provided for:

macOS on
Apple Silicon
golden gate ✅
tahoe ✅
sequoia ✅
Linux ARM64 ✅
x86_64 ✅

Current versions:

stable ✅ 1.9.7
head ⚡️ HEAD

Other versions:

libgit2@1.8 1.8.7 C library of Git core methods that is re-entrant and linkable
libgit2@1.7 1.7.2 C library of Git core methods that is re-entrant and linkable

Revision: 2

Depends on:

libssh2 1.11.1 C library implementing the SSH2 protocol
llhttp 9.4.4 Port of http_parser to llparse
openssl@4 4.1.0 Cryptography and SSL/TLS Toolkit

Depends on when building from source:

cmake 4.5.1 Cross-platform make
pkgconf 3.0.11 Package compiler and linker metadata toolkit

Binaries: git2

GitHub Packages downloads:

Last 30 days317,491
Downloads9,277,105
Analytics install events (30 days)61,666
Downloads / install events (30 days)5.2×

Source: GitHub Packages, fetched 2026-11-20T00:52:34Z. Analytics dates: 2026-10-21 to 2026-11-20. Totals exclude downloads from Bintray before the migration to GitHub Packages. Downloads and install attempts measure different things; the difference does not count analytics opt-outs. Definitions and limitations.

Analytics:

30 days90 days365 days
Installs61,662164,195554,563
Installs (--HEAD)41153
Installs on Request1,4355,12327,113
Installs on Request (--HEAD)3950
Build Errors311
Build Errors (--HEAD)2