libgit2@1.8 for Mac
C library of Git core methods that is re-entrant and linkable
libgit2@1.8 — overview
libgit2 - the Git linkable library
libgit2 is a portable, pure C implementation of the Git core methods provided as a linkable library with a solid API, allowing to build Git functionality into your application.
libgit2 is used in a variety of places, from GUI clients to hosting providers ("forges") and countless utilities and applications in between. Because it's written in C, it can be made available to any other programming language through "bindings", so you can use it in Ruby, .NET, Python, Node.js, Rust, and more.
libgit2 is licensed under a very permissive license (GPLv2 with a special Linking Exception). This means that you can link against the library with any kind of software without making that software fall under the GPL. Changes to libgit2 would still be covered under its GPL license.
Using libgit2 Quick Start Getting Help What It Can Do Optional dependencies Initialization Threading Conventions Building libgit2 - Using CMake Building Installation Advanced Usage Compiler and linker options macOS iOS Android MinGW Language Bindings How Can I Contribute? License
Using libgit2
Most of these instructions assume that you're writing an application in C and want to use libgit2 directly. If you're _not_ using C, and you're writing in a different language or platform like .NET, Node.js, or Ruby, then there is probably a "language binding" that you can use to take care of the messy tasks of calling into native code.
But if you _do_ want to use libgit2 directly - because you're building an application in C - then you may be able use an existing binary. There are packages for the vcpkg and
package managers. And libgit2 is available in Homebrew and most Linux distributions.
However, these versions _may_ be outdated and we recommend using the latest version if possible. Thankfully libgit2 is not hard to compile.
Quick Start
Prerequisites for building libgit2: CMake, and is recommended to be installed into your PATH. Python is used by our test framework, and should be installed into your PATH. C compiler: libgit2 is C90 and should compile on most compilers. Windows: Visual Studio is recommended Mac: Xcode is recommended Unix: gcc or clang is recommended.
Build Create a build directory beneath the libgit2 source directory, and change into it: mkdir build && cd build Create the cmake build environment: cmake .. Build libgit2: cmake --build .
Trouble with these steps? Read our troubleshooting guide. More detailed build guidance is available below.
Getting Help
Chat with us via IRC: join #libgit2 on libera. via Slack: visit slack.libgit2.org to sign up, then join us in #libgit2
Getting Help
If you have questions about the library, please be sure to check out the API documentation. If you still have questions, reach out to us on Slack or post a question on
(with the libgit2 tag).
Reporting Bugs
Details
Git 核心方法的 C 库,可重入且可链接
How to install libgit2@1.8
- Open Terminal (press ⌘ + Space and type “Terminal”).
- If Homebrew is not installed yet, run the command below first.
- Run this command:
Latest 10 releases
Last updated 2026-08-13; current version v1.9.7, with the latest 10 releases listed.
| Version | Released | Type | Size | macOS | Windows | Linux |
|---|---|---|---|---|---|---|
| v1.9.7 | 2026-08-13 | Stable | — | — | — | — |
| v1.8.7 | 2026-08-13 | Stable | — | — | — | — |
| v1.9.6 | 2026-07-18 | Stable | — | — | — | — |
| v1.9.5 | 2026-07-18 | Stable | — | — | — | — |
| v1.8.6 | 2026-07-18 | Stable | — | — | — | — |
| v1.9.4 | 2026-05-22 | Stable | — | — | — | — |
| v1.9.3 | 2026-05-04 | Stable | — | — | — | — |
| v1.9.2 | 2025-12-06 | Stable | — | — | — | — |
| v1.8.5 | 2025-12-06 | Stable | — | — | — | — |
| v2.0.0-rc.1 | 2026-10-14 | Pre-release | — | — | — | — |
Data from GitHub Releases; stable releases first, each group sorted newest first.
Compared with similar apps
Only public metadata is compared, with no subjective recommendation; see the compare pages for field-by-field comparisons.
| App | Version | License | Architecture | 30-day installs |
|---|---|---|---|---|
| libgit2@1.8 | v1.9.7 | GPL-2.0-only WITH GCC-exception-2.0 | CLI | 67 |
| git-delete-merged-branches | 7.7.0 | GPL-3.0-or-later | CLI | 66 |
| git-bug | v0.12.0 | GPL-3.0-or-later | CLI | 36 |
| git-quick-stats | 2.11.0 | MIT | CLI | 63 |
Similar apps: Developer Tools
git-delete-merged-branches
git-delete-merged-branchesgit-bug
[godoc/ur…git-quick-stats
Simple and efficient way to access statistics in gitgit-interactive-rebase-tool
Native sequence editor for Git interactive rebasenode
Node.js is an open-source, cross-platform JavaScript runtime environment.git
Git is a distributed version control system used to record every change made to code files…Categories: Command-line Tools, Developer Tools