agentleFS
gitbutlerappgitbutlerapp/grit/docs/llms.txt

grit

llms.txt586 starsChanged 5 days agoMITView on GitHub

Grit is a fast Git implementation in Rust: grit-lib is a linkable library for Rust programs, and grit is a modern Git client built on that library. On-disk formats and the wire protocol stay compatible with Git. Each docs page has a Markdown twin at the same URL with index.md instead of index.html. Use grit --json (and --markdown on many commands) for script- and agent-friendly CLI output. - Global options: Options that apply to every grit command. - Scripting with…

The file

Files
llms.txt
# Grit

> Grit is a fast Git implementation in Rust: grit-lib is a linkable library for Rust programs, and grit is a modern Git client built on that library. On-disk formats and the wire protocol stay compatible with Git.

Each docs page has a Markdown twin at the same URL with `index.md` instead of `index.html`. Use `grit --json` (and `--markdown` on many commands) for script- and agent-friendly CLI output.

## Whole sections

- [grit-cli.md](https://grit-scm.com/docs/grit-cli.md): The whole CLI in one file, to learn grit for everyday Git work.
- [grit-lib.md](https://grit-scm.com/docs/grit-lib.md): The whole library guide in one file, to build Git-compatible Rust programs.

## Getting started

- [Docs](https://grit-scm.com/docs/index.md): How to use grit, a simple Git client built on grit-lib. Start with the tutorial, then look up any command or open the library guide.
- [Install grit](https://grit-scm.com/docs/install/index.md): Install the grit CLI on your machine, try nightly builds, and keep your copy up to date.
- [Tutorial](https://grit-scm.com/docs/tutorial/index.md): Fifteen minutes with grit. Create a repository, record some changes, work on a branch, and share it with a remote.
- [Library quick start](https://grit-scm.com/docs/library-quickstart/index.md): Add grit-lib to a Rust project, open a repository, and read the current commit from HEAD.

## The grit CLI

- [Global options](https://grit-scm.com/docs/global-options/index.md): Options that apply to every grit command.
- [Scripting with grit](https://grit-scm.com/docs/scripting/index.md): Use --json and --filter to build scripts on top of grit.
- [Agent guide](https://grit-scm.com/docs/agents/index.md): Run grit from scripts and autonomous agents — JSON output, exit codes, non-interactive use, credentials, and where to read the docs.
### Getting started

- [grit init](https://grit-scm.com/docs/init/index.md): Create a new, empty repository.
- [grit clone](https://grit-scm.com/docs/clone/index.md): Copy a remote repository into a new directory.
- [grit status](https://grit-scm.com/docs/status/index.md): Show where you are and what's changed. This is what plain grit runs.
- [grit config](https://grit-scm.com/docs/config/index.md): Read, set, list or remove configuration values.
### Making changes

- [grit add](https://grit-scm.com/docs/add/index.md): Stage changes. With no paths, stages everything.
- [grit commit](https://grit-scm.com/docs/commit/index.md): Stage every change and record a new commit.
- [grit diff](https://grit-scm.com/docs/diff/index.md): Show uncommitted changes, or the change a commit introduced.
- [grit restore](https://grit-scm.com/docs/restore/index.md): Restore working tree and/or index paths from HEAD, the index, or another revision.
### History

- [grit log](https://grit-scm.com/docs/log/index.md): Show recent commits, newest first, a page at a time.
- [grit shortlog](https://grit-scm.com/docs/shortlog/index.md): List the commits on this branch that aren't on the target branch yet.
- [grit show](https://grit-scm.com/docs/show/index.md): Show a commit, tag or branch, and a summary of what it changed.
### Branches and tags

- [grit branch](https://grit-scm.com/docs/branch/index.md): List branches, or create or delete one.
- [grit switch](https://grit-scm.com/docs/switch/index.md): Switch to another branch, or create one and switch to it.
- [grit merge](https://grit-scm.com/docs/merge/index.md): Merge another branch into the current one.
- [grit pick](https://grit-scm.com/docs/pick/index.md): Copy a single commit onto the current branch.
- [grit tag](https://grit-scm.com/docs/tag/index.md): List tags, or create or delete one. A new tag points at the current commit.
### Remotes

- [grit remote](https://grit-scm.com/docs/remote/index.md): List remotes, add one, or list refs on a remote.
- [grit fetch](https://grit-scm.com/docs/fetch/index.md): Download new commits, branches and tags from a remote.
- [grit pull](https://grit-scm.com/docs/pull/index.md): Fetch from the remote and bring the current branch up to date.
- [grit push](https://grit-scm.com/docs/push/index.md): Publish the current branch, or your tags, to a remote.
- [grit auth](https://grit-scm.com/docs/auth/index.md): Sign in to GitHub so HTTPS pushes and fetches just work.
- [grit bundle](https://grit-scm.com/docs/bundle/index.md): Create, verify, and list git bundle files for offline transfer.
### Maintenance

- [grit update](https://grit-scm.com/docs/update/index.md): Update grit to the latest release.
- [grit skill](https://grit-scm.com/docs/skill/index.md): Print an agent skill that explains how to use grit.
- [grit completions](https://grit-scm.com/docs/completions/index.md): Generate shell completion scripts for bash, zsh, and fish.
### Plumbing

- [grit upload-pack](https://grit-scm.com/docs/upload-pack/index.md): Serve a fetch or clone of a repository over stdin and stdout.
- [grit receive-pack](https://grit-scm.com/docs/receive-pack/index.md): Accept a push to a repository over stdin and stdout.
- [grit manager](https://grit-scm.com/docs/manager/index.md): A credential helper that stores passwords and tokens in the Windows Credential Manager.

## Library guide

- [Overview](https://grit-scm.com/docs/library/index.md): Use grit-lib from Rust — the same engine that powers the grit CLI.
- [grit-lib API map](https://grit-scm.com/docs/library/api-map/index.md): Generated index of public grit-lib modules and key types with docs.rs links.
- [Reachability bitmaps](https://grit-scm.com/docs/library/bitmaps/index.md): Query pack and MIDX commit bitmaps for fast object reachability and counting.
- [Diff](https://grit-scm.com/docs/library/diff/index.md): Tree-to-tree and index-to-worktree diffs, blob patches, and the DiffEntry model the grit CLI renders.
- [Embedding grit-lib](https://grit-scm.com/docs/library/embedding/index.md): Run multiple repositories in one process with explicit Environment, sinks, subprocess injection, and typed errors.
- [Network](https://grit-scm.com/docs/library/network/index.md): Remote dispatch, fetch, push, and ls-remote over every transport.
- [Object stores](https://grit-scm.com/docs/library/object-stores/index.md): Pluggable ObjectStore backends, OdbBuilder, and the odb_conformance test suite.
- [Objects](https://grit-scm.com/docs/library/objects/index.md): ObjectId, ObjectKind, and reading or writing blobs, trees, and commits through Odb.
- [Pack reachability bitmaps](https://grit-scm.com/docs/library/pack-bitmaps/index.md): Read and write Git pack `.bitmap` sidecars (EWAH reachability sets, name-hash cache, lookup tables).
- [Refs](https://grit-scm.com/docs/library/refs/index.md): Resolve HEAD, list branches and tags, update refs with reflog, and how grit-lib picks loose, packed, or reftable storage.
- [Repository](https://grit-scm.com/docs/library/repository/index.md): Open and discover Git repositories with an explicit Environment, read git-dir vs work tree, load config, and handle grit_lib::Error.
- [Revwalk](https://grit-scm.com/docs/library/revwalk/index.md): Resolve revisions, walk history with rev-list, ranges (A..B), ordering, and merge bases.
- [Index](https://grit-scm.com/docs/library/staging/index.md): Load the staging index, stage paths with porcelain add, and write a tree object from staged entries.

## Benchmarks

- [Benchmarks](https://grit-scm.com/docs/benchmarks/index.md): Grit vs Git on realistic workloads, from the committed grit-bench baseline.

## Optional

- [grit-lib on docs.rs](https://docs.rs/grit-lib): Rust API reference generated from crate rustdoc.
- [Grit is now maintained by a factory of agents](https://grit-scm.com/blog/the-grit-maintenance-factory/index.md): Grit now has an almost fully autonomous maintainer. Cloud agents plan the roadmap, fix issues, review each other's work, land changes, cut a release every day and test it on Linux, macOS and Windows. Here's how it works and where to watch it.
- [Goodbye grit-git](https://grit-scm.com/blog/goodbye-grit-git/index.md): We removed the Git-compatible grit-git CLI and the ported test harness. Grit is now two things: a complete Git library and a simpler CLI built on it.
- [A new site, and a new focus](https://grit-scm.com/blog/a-new-site-and-a-new-focus/index.md): Grit got far enough on Git's own test suite that the next problem isn't compatibility. It's speed and a library worth linking. Here's what changes.
- [grit is now the simple CLI](https://grit-scm.com/blog/grit-is-now-the-simple-cli/index.md): The grit binary you install is now the simple, library-first CLI. The fully git-compatible mirror moves to grit-git.
- [Introducing Grit](https://grit-scm.com/blog/introducing-grit/index.md): A short note on rebuilding Git in Rust, as a library, with compatibility as the benchmark.
- [Blog](https://grit-scm.com/blog/): release notes and project updates.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.