qmetrics.net

git2-rs

Safe Rust bindings to the libgit2 Git library

git2-rs screenshot

git2-rs exposes libgit2 to Rust programs for repository work. Local repository features are enabled by default; optional features add HTTPS and SSH networking.

Overview

git2-rs provides Rust bindings to libgit2, the C library used to manage Git repositories. The crate wraps libgit2 closely while adding stronger types and automatic resource management, including Result-based error handling across interfaces.

By default the library supports local repository operations without network access. Enabling the https and/or ssh Cargo features unlocks cloning and other remote workflows; both are recommended when code accepts user-supplied repository URLs. The bundled libgit2-sys crate vendors libgit2 sources, so a system install is optional—static linking applies when vendoring is on or no suitable system library is found, and dynamic linking is attempted when an appropriate version is present.

Typical use starts from a Repository opened, initialized, or cloned on disk. Most derived objects—commits, branches, diffs, and similar types—tie to that repository’s lifetime so handles cannot outlive the parent repo. The API covers indexing, merging, rebasing, diffs, configuration, remotes, and many other libgit2 capabilities exposed as Rust modules and structs.

git2-rs targets stable Rust and generally supports the prior stable release as well. It requires libgit2 2.0.0-rc.1 or newer patch releases. When the ssh feature is enabled on macOS, builds depend on libssh2 and OpenSSL per upstream crate guidance.

Key features

  • Repository open init and clone
  • Optional HTTPS remote support
  • Optional SSH remote support
  • Vendored or dynamic libgit2
  • Strongly typed libgit2 APIs
  • Automatic resource cleanup
  • Merge rebase and diff APIs
  • Stable Rust compatibility

Use cases

  • Git automation in Rust
  • Custom repository tooling
  • Embedded Git operations
  • CI and build scripts
  • Remote clone with SSH or HTTPS

Similar software

GitLens

Git visualization and workflow extension for VS Code

GitLens extends Visual Studio Code with blame, history, commit graph views, and Git workflows maintained by GitKraken. A free Community edition coexists with paid Pro capabilities.

  • Interactive Commit Graph
  • Inline blame and CodeLens
  • Branch and worktree management
TypeScriptDetails →
★ 10k⟳ todayMIT · open core

isomorphic-git

Pure JavaScript git client for Node and browsers

A JavaScript reimplementation of git that runs in Node.js and in the browser without native C++ dependencies. It reads and writes repositories, and can fetch from and push to remotes.

  • Clone and push without native modules
  • Same code in Node and browser
  • Pluggable file system and HTTP
JavaScriptWeb, CLIDetails →
★ 8.4k⟳ todayMIT

Neogit

Magit-inspired Git UI inside Neovim

Neogit brings an interactive Git interface to Neovim with popups for branch, commit, rebase, and stash workflows inspired by Magit.

  • Magit-style popup menus
  • Tab, split, and float layouts
  • Visual range cherry-picks
LuaDetails →
★ 5.7k⟳ todayMIT

GitPython

Python library for Git repository operations

GitPython lets Python programs work with Git repos at porcelain or plumbing level, often by wrapping the git executable.

  • Repository and object API
  • Porcelain and plumbing style access
  • Remotes and submodules
PythonWindowsDetails →
★ 5.2k⟳ 2 days agoBSD-3-Clause

nbdime

Content-aware Jupyter notebook diff and merge tools

nbdime compares and merges Jupyter notebooks with structure-aware logic instead of raw line diffs. It offers terminal and web-based commands and hooks into Git and Mercurial.

  • Structure-aware notebook diffs
  • Three-way notebook merge
  • Terminal and web diff viewers
TypeScriptWeb, CLIDetails →
★ 2.8k⟳ 5 months agoBSD-3-Clause · open core

GitHub Pull Requests

GitHub pull requests and issues inside VS Code

A Microsoft extension to browse, review, and manage GitHub pull requests and issues from Visual Studio Code, including GitHub Enterprise.

  • GitHub and Enterprise authentication
  • List and browse pull requests
  • In-editor PR review comments
TypeScriptDetails →
★ 2.6k⟳ todayMIT