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.3 Port of http_parser to llparse
openssl@4 4.1.0 Cryptography and SSL/TLS Toolkit

Depends on when building from source:

cmake 4.4.5 Cross-platform make
pkgconf 3.0.10 Package compiler and linker metadata toolkit

Binaries: git2

GitHub Packages downloads:

Last 30 days369,604
Downloads9,196,484
Analytics install events (30 days)70,073
Downloads / install events (30 days)5.3×

Source: GitHub Packages, fetched 2026-11-12T00:51:12Z. Analytics dates: 2026-10-13 to 2026-11-12. 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
Installs70,069175,238545,503
Installs (--HEAD)41353
Installs on Request1,9656,13627,262
Installs on Request (--HEAD)41251
Build Errors319
Build Errors (--HEAD)3