Skip to main content
Keep a file’s version in Git and its bytes in Gat, then restore it in a fresh clone. Before you start, install Gat and open an existing Git repository. Replace assets/model.bin below with a file that Git does not already track. Already using Git LFS or DVC? Follow the migration guide to transfer existing files.
Working with an AI assistant? Connect it to the Gat MCP server so it can search the documentation as you follow this guide.
1

Initialize Gat

This prepares the local cache, . Run it once in each clone.
2

Choose storage

This example uses a local directory with no cloud account or credentials. Choose the commands for your shell:
A Gat remote stores file content; a Git remote stores commits. Adding a Gat remote never selects a default, even when it is named origin.
Keep this storage directory: the fresh clone will read from it. For shared storage, follow Set up a remote.
3

Track and commit a file

The file stays in your working tree. Git commits its path and in gat.lock, plus the storage configuration in gat.yaml.
Gat manages entries in .git/info/exclude so ordinary git add commands skip Gat-managed files. The bytes live in .gat/objects by default. See How Gat works.
4

Upload the bytes

When sharing changes with teammates, run gat push before git push so the objects are available before their commits are published.
5

Restore the file in a fresh clone

From the original repository, clone into a sibling directory:
Git supplies the metadata; gat pull downloads the bytes and restores files for the current checkout. This local example works on the same machine.
Open assets/model.bin in the new clone and confirm its contents. gat ls-files lists the tracked paths.

Everyday commands

gat status does not inspect file contents. Record edits with gat add; use gat sync --dry-run to preview working-tree reconciliation.
Git hooks run sync after checkout/switch, merge/pull, and rebase/amend. After git reset --hard or git restore, run gat sync yourself. Use gat pull if required objects are missing from the cache.

Next steps

Set up shared storage

Connect cloud storage or a shared directory.

Work with your team

Publish changes and resolve merge conflicts.

Choose a working set

Pull only the paths you need or save a default selection.

Understand automatic sync

Control fetching and working-tree updates after Git operations.