Common issues and solutions for the cleaned git-drs CLI.
Navigation: Getting Started -> Commands Reference -> Troubleshooting
git drs init each time?No.
git drs init is repository setup. In most cases you do not need to run it manually at all, because git drs remote add ... now bootstraps that setup automatically when it is missing.
Run it when:
git-drs state before adding any remoteDo not run it every session:
git pullWhat it changes:
.git/drs/ repository-local stategit-drs repository configuration and hooksgit drs init again?Usually nothing catastrophic, but it is unnecessary.
If you did it accidentally:
inspect what changed
git status
git diff
if the changes are harmless, leave them alone or commit what you intended
if you want to discard the uncommitted changes, use normal Git restore/reset flow carefully
if hooks or repo-local state were repaired intentionally, keep the changes
The right default is: inspect first, then decide whether anything actually needs to be reverted.
git drs init actually change?It prepares repository-local git-drs state:
.git/drs/ metadata/stategit-drs workflowsThose changes persist in the clone. They are not something you redo per session.
git-drs forgit-drs setupExamples:
git drs remote add gen3 ...git drs remote remove ...git drs initgit drs trackgit drs ls-filesgit drs pullgit drs add-urlgit drs copy-recordsExamples:
git addgit commitgit pushgit pullBefore debugging behavior, keep the command split straight:
git pull
git drs pull
git drs ls-files
If you blur those together, the failure modes get confusing.
Check these in order:
confirm the file pattern was tracked before the add/commit flow
git drs track
confirm .gitattributes was staged after changing tracking rules
git status
confirm the file shows up in the tracked inventory
git drs ls-files
inspect .git/drs/ logs if the hook path failed
Check:
git drs remote list
git drs ls-files --drs
Then retry with higher Git/HTTP verbosity if needed:
GIT_TRACE=1 GIT_CURL_VERBOSE=1 git drs push
That usually just means hydration has not happened yet.
Run:
git drs remote list
git drs pull
If the repo has never had a git-drs remote configured, run git drs remote add ... first. That command will also install the repo-local hooks/config.
If you use SSH remotes, keepalives help:
Host github.com
TCPKeepAlive yes
ServerAliveInterval 30
git drs pull did not update my branchThat is expected.
git drs pull no longer runs git pull.
Use:
git pull
git drs pull
git drs ls-files does not show my fileThis is not expected for a pointer created by a current git drs add-ref:
add-ref automatically adds its destination to .gitattributes. For pointers
created with an older version, add the tracking rule with
git drs track path/to/file and stage .gitattributes.
Check these in order:
git drs track
.gitattributes after adding the pattern?git add .gitattributes
git ls-files -- path/to/file
git drs ls-files -l
git add ... git drs add-ref --remote ... reports unknown option 'remote'git add and git drs add-ref are separate commands. If they are entered on
the same command line, Git interprets --remote as an option to git add,
which does not have that option.
Create the reference first, then stage the generated pointer and tracking rule:
git drs add-ref --remote anvil drs://drs.anv0:v2_example subject.tsv
git add .gitattributes subject.tsv
git commit -m "Add subject.tsv reference"
Do not prefix the git drs add-ref command with git add.
git remote remove did not remove my git-drs remoteThat is expected.
Git remotes and git-drs remotes live in different config domains.
Use:
git drs remote list
git drs remote remove <name>
or:
git drs remote rm <name>
git drs pull does nothingThat usually means one of these:
git-drsCheck:
git drs ls-files
git drs ls-files -I "*.bam"
git drs pull --dry-run -I "*.bam"
git drs pull still leaves pointer filesCheck DRS registration status:
git drs ls-files --drs
If the object is not registered or not resolvable from the configured remote, hydration cannot succeed.
Also confirm the remote configuration:
git drs remote list
If needed, inspect the detailed logs:
ls -la .git/drs/
git drs remote add gen3 fails on bucket mappingCurrent shape:
git drs remote add gen3 [remote-name] <organization/project> [--cred <file> | --token <token>]
If this fails, the likely cause is missing bucket mapping for that scope.
That mapping is usually steward/admin setup, not something the end user invents ad hoc.
Refresh by re-adding the remote with a new credential file or token:
git drs remote add gen3 production HTAN_INT/BForePC --cred /path/to/new-credentials.json
You do not need to run git drs init again.
What git-drs does automatically:
git-drs will attempt to refresh the access tokengit drs remote add gen3 ...How to think about recovery:
git drs remote add gen3 ... --cred ... or --token ...How to check what is in use:
git drs remote list
And for the underlying Gen3 profile data:
~/.gen3/gen3_client_config.iniIf you want the least surprising fix, just re-run git drs remote add gen3 ... with the current credential file. That updates the stored profile and repo token plumbing in one step.
git drs push fails with upload or register errorsCheck:
git drs remote list
git drs ls-files --drs
Typical root causes:
If the failure happened during managed data push behavior, make sure you actually ran:
git drs push
Plain git push does not run git-drs registration/upload behavior.
Symptoms:
git drs ls-files does not show the fileRecovery:
git drs track "*.bam"
git add .gitattributes
git rm --cached large-file.bam
git add large-file.bam
git commit -m "Track large file with git-drs"
That is normal.
After cloning:
git drs pull
Or hydrate only what you need:
git drs pull -I "*.bam"
git clone or git checkout downloads too much datagit checkout is fully safe by default. Git DRS automatically skips downloading file payloads during checkout/clone (to keep checkouts fast). Only the lightweight pointer files are written to the working tree initially.
git drs pull
Or hydrate only what you need:
git drs pull -I "*.bam"
git drs remote add gen3 public HTAN_INT/BForePC --no-skip-smudge
git config drs.skipsmudge false
export GIT_LFS_SKIP_SMUDGE=false
When behavior is unclear, use this sequence:
git drs remote list
git drs track
git drs ls-files -l
git drs ls-files --drs
git drs pull --dry-run
That usually tells you whether the problem is:
Useful checks:
git drs remote list
git drs track
git drs ls-files -l
git drs ls-files --drs
ls -la .git/drs/
If you see old notes mentioning these, ignore them:
git drs fetchgit drs listgit drs uploadgit drs downloadThose were removed from the cleaned CLI surface.