Skip to main content
gat gc is Experimental: its interface or behavior may change or be removed between releases. See Feature lifecycle.
keeps objects referenced by the selected Git histories and the current repository’s working lock. Local-cache and remote collection use the same rules to decide what to keep. See history selection for snapshot traversal and shared caches for storage used by multiple clones. Use repeatable --repository <LOCATION> to protect other Git repositories. History flags apply to each repository independently: revision and exclusion names must resolve in every repository. Per-repository selectors are not supported.
Supply every repository that shares the storage, including shared local caches. Gat does not discover them automatically. Only committed locks from additional repositories are protected; their uncommitted changes are not included.
Local paths, file URLs, and remote Git URLs all use temporary bare clones. Gat removes these clones after inspection.
Start with --dry-run. Remote deletion requires --unsafe:
An inspection failure or shallow history blocks deletion unless --unsafe is supplied; dry runs report uncertain objects. --unsafe can delete objects still in use. It does not protect against concurrent uploads or unlisted repositories sharing storage.

Usage

Examples

Retain the current working lock and peer protections without consulting this repository’s history.