A highly extensible Git implementation library written in pure Go, supporting both low-level plumbing and high-level porcelain operations.
go-git is a Git implementation library written entirely in Go, providing both low-level (plumbing) and high-level (porcelain) operations through an idiomatic Go API. It solves the problem of integrating Git functionality into Go applications without requiring external Git binaries or C dependencies. The library supports extensible storage backends and aims for full compatibility with standard Git.
Go developers building applications that need to programmatically interact with Git repositories, such as CI/CD tools, Git hosting platforms, or version-controlled data pipelines.
Developers choose go-git for its pure Go implementation, which eliminates external dependencies and simplifies deployment. Its extensible design, active maintenance, and production use by major projects make it a reliable choice for building Git-powered tools in Go.
A highly extensible Git implementation in pure Go.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
No external Git binaries or C libraries are required, making deployments cross-platform and dependency-free, as highlighted in the README for easy integration into Go projects.
Supports in-memory filesystems and custom implementations via the Storer interface, enabling flexible use cases like testing or ephemeral workflows, demonstrated in the examples.
Aims to be fully compatible with standard Git, implementing both plumbing and porcelain operations, ensuring reliable behavior for most common use cases as stated in the philosophy.
Actively maintained since 2015 and used by major projects like Keybase and Gitea, showing real-world reliability and ongoing community support.
Admitted in the compatibility documentation, go-git may not implement all Git features or handle every edge case, which can be a limitation for advanced or niche workflows.
As a pure Go reimplementation, it might not match the performance of the native C-based Git, especially for operations on large repositories or complex histories, leading to potential slowdowns.
The project faced legal issues and a hard fork, which could raise doubts about long-term stability, though it is now backed by a new company and actively maintained.