Commands
Core Commands
Section titled “Core Commands”gda init
Section titled “gda init”Initialize a GDA repository in the current directory.
gda initCreates .gda/ with the object store and index. Safe to run on an existing repo (no-op if already initialized).
gda add <path> [<path> ...]
Section titled “gda add <path> [<path> ...]”Track files or directories in the store. Directories are walked recursively.
gda add sub-01/meg/run.fifgda add sub-02/gda add bids/ derivatives/Behavior:
- Computes SHA256 hash while copying to store (single pass)
- Replaces each file with a relative symlink to the object
- Skips existing symlinks and directories automatically
- Deduplicates: identical files share one object
gda status [<path> ...]
Section titled “gda status [<path> ...]”Show tracked files and whether they’re intact.
$ gda statusTracked files: ok 512.0 KB sub-01/meg/run.fif ok 1.2 KB sub-01/beh/data.csv unlocked 496.0 KB sub-02/meg/run.fif2 files, 1.0 MB totalStatus values:
| Status | Meaning |
|---|---|
ok | Symlink exists, resolves, and content matches hash |
unlocked | Symlink replaced with writable copy, content matches stored hash |
modified | Unlocked file, content differs from stored hash |
missing | No file or symlink at tracked path |
broken | Symlink exists but target is missing |
corrupt | Symlink resolves but stored content doesn’t match hash |
Snapshots
Section titled “Snapshots”gda snapshot [<name>]
Section titled “gda snapshot [<name>]”Create a named checkpoint of the current index.
$ gda snapshotSnapshot "snapshot-1749134400" saved (143 files, 12.3 GB)
$ gda snapshot preprocessing-v3Snapshot "preprocessing-v3" saved (158 files, 12.5 GB)Auto-generates a timestamp-based name if none is provided.
gda log
Section titled “gda log”List all snapshots with details.
$ gda log preprocessing-v3 2026-06-05 12:40:00 158 files 12.5 GB preprocessing-v2 2026-06-03 09:15:22 143 files 12.3 GB preprocessing-v1 2026-06-01 14:32:05 127 files 11.8 GB raw-v1 2026-05-28 11:00:00 112 files 11.2 GBMost recent snapshot appears first.
gda checkout <snapshot-name>
Section titled “gda checkout <snapshot-name>”Restore your project folder to a snapshot state.
$ gda checkout raw-v1Restored "raw-v1" (112 files)Safety:
- Removes files tracked in the current index but absent in the snapshot
- Warns about unlocked modified files without overwriting them
- Creates parent directories automatically
Maintenance
Section titled “Maintenance”gda gc [--dry-run]
Section titled “gda gc [--dry-run]”Remove objects not referenced by any snapshot or the current index.
$ gda gc --dry-runWould remove 12 objects (45.2 MB), keep 158 objects
$ gda gcRemoved 12 objects (45.2 MB), keeping 158 objectsObjects younger than 1 hour are never removed (grace period prevents race conditions).
gda fsck
Section titled “gda fsck”Scan your project and repair file integrity issues.
$ gda fsck158 ok, 0 broken, 0 fixed, 0 modified, 0 missingAutomatically repairs broken symlinks when the object exists in the store.
File Editing
Section titled “File Editing”gda unlock <path> [<path> ...]
Section titled “gda unlock <path> [<path> ...]”Materialize a symlink into a writable copy for editing.
$ gda unlock sub-01/beh/data.csvUnlocked sub-01/beh/data.csv$ gda status unlocked 1.2 KB sub-01/beh/data.csvgda lock <path> [<path> ...]
Section titled “gda lock <path> [<path> ...]”Re-hash an unlocked file, store new content if changed, restore symlink.
$ gda lock sub-01/beh/data.csvLocked sub-01/beh/data.csvIf content changed, a new object is created. The old object persists for previous snapshots.
File Management
Section titled “File Management”gda mv <source> <dest>
Section titled “gda mv <source> <dest>”Rename a tracked file or directory prefix.
$ gda mv sub-01/meg/run.fif sub-01/meg/run-01.fifMoved sub-01/meg/run.fif -> sub-01/meg/run-01.fif
$ gda mv bids/raw/ bids/sourcedata/Moved 12 files from bids/raw/ -> bids/sourcedata/Safety: Aborts if the source is not a symlink (prevents data loss with modified files).
gda rm <path> [<path> ...]
Section titled “gda rm <path> [<path> ...]”Untrack files. Content stays in the store (use gc to reclaim space).
$ gda rm sub-02/temp/scratch.nii.gzRemoved sub-02/temp/scratch.nii.gz from index (content retained in store)Remote Operations
Section titled “Remote Operations”gda remote add <name> <url>
Section titled “gda remote add <name> <url>”Add a remote rsync target.
gda remote add origin rsync://server/path/to/storegda remote list
Section titled “gda remote list”Show configured remotes.
$ gda remote listorigin: rsync://server/path/to/storegda push <remote-name>
Section titled “gda push <remote-name>”Sync local objects to remote.
gda push originCopies only objects not present on the remote.
gda pull <remote-name>
Section titled “gda pull <remote-name>”Sync remote objects to local.
gda pull origingda help [<command>]
Section titled “gda help [<command>]”Show help for a specific command.
gda help addgda help snapshotWithout arguments, shows the full command list.
Global Flags
Section titled “Global Flags”| Flag | Description |
|---|---|
GDA_DEV=1 | Enable debug logging to stderr with timestamps and operation durations |