$ grit
The command line
Works on any Git repository and talks to any remote. Plain-language output and --json on every command.
start hereTutorial →flagsGlobal optionsguideDebugging and tracing--json / --filterScriptingguideCLI conventionsguideExit codesautomationAgent guideguideJSON schemas
Commands
Getting started
grit initCreate a new, empty repository.grit cloneCopy a remote repository into a new directory.grit checkoutStart work on a repository from a snapshot of its main branch, or of some of its paths, instead of a clone.grit statusShow where you are and what's changed. This is what plain grit runs.grit configRead, set, list or remove configuration values.Making changes
grit addStage changes. With no paths, stages everything.grit commitStage every change and record a new commit.grit diffShow uncommitted, staged, commit, or range changes.grit restoreRestore working tree and/or index paths from HEAD, the index, or another revision.grit rmRemove tracked paths from the working tree and index.grit mvRename or move tracked paths.grit stashSave and restore shelved work.History
grit logShow commits, newest first: the whole history in the pager on a terminal, a page at a time for scripts and agents.grit blameShow who last modified each line of a file.grit reflogShow, delete, or expire reflog entries.grit shortlogList the commits on this branch that aren't on the target branch yet.grit revsList or count commits matching revision ranges.grit showShow a commit, tag or branch, and the change it introduced.grit merge-baseFind common ancestors or test whether one commit is an ancestor of another.grit notesList, show, add, and remove Git notes on commits.grit describeNearest reachable tag, exact commit distance, and abbreviated id for a revision.grit rebaseReplay local commits onto a new base; recover from conflicts and exec commands that leave edits.grit historyStateless history rewrite helpers (reword, and more over time).Branches and tags
grit branchList branches, or create, delete, rename, or configure one.grit switchSwitch to another branch, remote branch, or detached commit.grit mergeMerge another branch, tag or commit into the current one.grit resetMove the branch tip and optionally reset the index or worktree.grit pickCherry-pick one or more commits onto the current branch.grit revertUndo commits with new inverse commits.grit tagList tags, or create or delete one (lightweight or annotated).grit worktreeList, add, and remove linked worktrees for the same repository.Remotes
grit remoteList remotes, add one, show one, set URLs, rename or remove one, or list refs on a remote.grit fetchDownload new commits, branches and tags from a remote.grit pullFetch from the remote and bring the current branch up to date.grit pushPublish branches, tags, or explicit refspecs to a remote.grit authSign in to GitButler Code, GitHub or a grit serve host, or save a username and token for any HTTPS host, so pushes and fetches just work.grit bundleCreate, verify, list, and unbundle git bundle files for offline transfer.grit serveServe repositories over HTTP, with a web view where people sign in with email and password.grit checkinSend a snapshot checkout's branches back to the server, rebuilt on its real history.grit integrateMerge a branch into the server's target branch, from a snapshot checkout or a clone of a hosted project.grit sliceName sets of paths to check out together, kept on the server's target branch.grit syncPush and pull every active branch between a clone and your space on a grit hosting server.grit shareWork on a branch together with other users of a grit hosting server, each with their own head of it.Maintenance
grit cleanRemove untracked files from the working tree.grit updateUpdate grit to the latest release.grit repackPack reachable objects and remove redundant packs.grit skillPrint an agent skill that explains how to use grit.grit completionsGenerate shell completion scripts for bash, zsh, and fish.grit gcRun repository maintenance — pack refs, expire reflogs, repack, prune, and refresh commit-graph.grit fsckCheck refs, objects, and pack indexes for problems.Plumbing
grit hooksList hook scripts and run them by name.grit upload-packServe a fetch or clone of a repository over stdin and stdout.grit patch-idStable patch-IDs for commits (cherry-pick equivalence).grit receive-packAccept a push to a repository over stdin and stdout.grit managerA credential helper that stores passwords and tokens in the Windows Credential Manager.grit resolveResolve revision specs to object ids and types.grit catShow blob, tree, commit, or tag contents for a revision spec.grit ignoreQuery whether paths match exclude (gitignore) rules.For agents
- grit-cli.md — the whole CLI in one file, to learn grit for everyday Git work
- grit-lib.md — the whole library guide in one file, to build Git-compatible Rust programs
- llms.txt — an index of every page with a one-line summary
- llms-full.txt — every docs page in one file
Every page has a Markdown twin: swap index.html for index.md. grit skill prints an agent skill for the CLI.