Current reference for the cleaned git-drs CLI.
Navigation: Getting Started -> Commands Reference -> Troubleshooting
Install global Git filter configuration for git-drs.
git drs installThis sets the global filter.drs.* entries used by Git clean/smudge/filter operations.
Initialize or repair repo-local git-drs wiring in the current repository.
git drs init [flags]Common flags:
--transfers <n>: concurrent transfers--upsert: enable upsert behavior for push/register flows--multipart-threshold <mb>: multipart threshold in MB--enable-data-client-logs: enable lower-level client logging
Use this when you want explicit initialization or to repair repo-local hooks/config. For normal onboarding, git drs remote add ... now bootstraps repo-local setup automatically when it is missing.
Add or refresh a Gen3-backed Syfon remote.
git drs remote add gen3 [remote-name] <organization/project> --cred <credentials-file>
git drs remote add gen3 [remote-name] <organization/project> --token <bearer-token>Notes:
remote-nameis optional; if omitted, the default remote name is used- scope is always one positional argument:
organization/project --credimports a Gen3 credential file--tokenuses a temporary bearer token- if repo-local
git-drssetup is missing, this command bootstraps it - bucket resolution is scope-driven; users normally do not provide
--bucket
Add or refresh a local Syfon/DRS remote.
git drs remote add local local-dev http://localhost:8080 HTAN_INT/BForePC
git drs remote add local local-dev http://localhost:8080 HTAN_INT/BForePC --username drs-user --password drs-passNotes:
- local mode can store HTTP basic auth for helper flows
- repo-local
git-drssetup is also bootstrapped here when missing
List configured git-drs remotes.
git drs remote listRemove a configured git-drs remote.
git drs remote remove <remote-name>
git drs remote rm <remote-name>This removes git-drs remote config, not normal Git remotes.
Set the default git-drs remote.
git drs remote set productionTrack files or globs with git-drs pointer behavior.
git drs track "*.bam"
git drs track "data/**"Stage .gitattributes after changing tracked patterns.
Stop tracking a pattern.
git drs untrack "*.bam"List tracked files in the current checkout.
git drs ls-files
git drs ls-files -l
git drs ls-files --drs
git drs ls-files -I "*.bam"
git drs ls-files -n results/**Important behavior:
- default mode is local-first and cheap
*means localized/hydrated in the worktree-means the worktree still contains a pointer--drsadds DRS registration checks
Common flags:
-I, --include <pattern>: include filter; may be repeated-l, --long: long output-n, --name-only: path-only output--json: structured output--drs: include DRS lookup details
Hydrate tracked pointer files already present in the current checkout.
git drs pull
git drs pull -I "*.bam"
git drs pull -I "data/**" -I "results/*.txt"
git drs pull --dry-run -I "results/**"Important behavior:
git drs pulldoes not rungit pull- it only hydrates tracked pointer files already present in the checkout
- include matching is against repo-relative paths
Run the managed git-drs push path.
git drs push
git drs push productionWhat it does:
- resolves local pointer/object metadata
- discovers all newly reachable LFS/DRS pointer objects in the Git object graph
- compares them with the remote
refs/git-drs/synced/*acknowledgment ref - registers only missing scoped metadata
- uploads only missing local payload bytes
- advances the synchronization acknowledgment only after Git and DRS work succeeds
- completes the Git push flow
Notes:
- this is the normal command for tracked data changes
- plain
git pushdoes not triggergit-drsregistration or upload behavior - synchronization is history-derived; pointers deleted from the tip remain covered while reachable from Git history
- the remote acknowledgment ref allows a later
git drs pushfrom another clone to recover after plaingit push - unreachable-object cleanup is separate from normal push and is not performed implicitly
Create a pointer plus local DRS metadata for an object that already exists in provider storage.
git drs add-url path/to/object.bin data/from-bucket.bin --scheme s3
git drs add-url s3://my-bucket/path/to/object.bin data/from-bucket.bin
git drs add-url s3://my-bucket/path/to/object.bin data/from-bucket.bin --sha256 <hex>Notes:
- object-key mode resolves against the configured bucket scope
- explicit provider URL mode remains supported
--schemeis required for object-key mode- registration happens later on
git drs push
Add a local pointer file for an existing DRS object.
git drs add-ref drs://example/object-id data/object.binQuery a DRS object by ID or checksum.
git drs query drs://example/object-id
git drs query --checksum <sha256>Remove tracked git-drs files from the worktree and index.
git drs rm data/sample.bam
git drs rm data/sample1.bam data/sample2.bamWhat it does:
- validates that each path is tracked as a
git-drspointer-managed file - runs
git rmfor those paths - leaves remote DRS reconciliation to the later
git drs push
Remote behavior on push:
git drs pushremoves the pointer from the Git tip but does not delete the DRS record or payload- historical DRS objects remain available while their pointers are reachable from Git history
- use the explicit
git drs deletecommand when destructive DRS deletion is intended
Copy Syfon metadata records from one configured remote to another for one scope.
git drs copy-records prod HTAN_INT/BForePC
git drs copy-records dev prod HTAN_INT/BForePCBehavior:
- with one remote arg:
- source defaults to the configured default remote
- the arg is treated as the target remote
- with two remote args:
- first is source
- second is target
- copies metadata only, not object bytes
Merge behavior for existing target records:
- match by DID first, then by checksum where applicable
- union
controlled_access - union
access_methods - preserve existing target metadata otherwise
These are typically steward/admin setup commands, not normal day-to-day end-user commands.
Declare bucket credentials for a remote.
Map an organization to a bucket path.
git drs bucket add-organization production \
--organization HTAN_INT \
--path s3://cbds/htan-intMap a project to a bucket path.
git drs bucket add-project production \
--organization HTAN_INT \
--project BForePC \
--path s3://cbds/htan-int/bforepcDisplay version information.
git drs versionThese commands are gone from the cleaned CLI:
git drs fetchgit drs listgit drs uploadgit drs download
If older notes mention them, treat those references as stale.