Skip to main content
gat gc is Experimental: its interface or behavior may change. 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. To stop tracking a file, use gat rm. Use repeatable --repository <LOCATION> to protect other Git repositories.
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 . Gat removes them after inspection.History flags apply to every repository. Revision and exclusion names must resolve in each one; per-repository selectors are not supported.
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.