I'm working in a monsterously huge git
mono-repo on the order of 100 GB in size. we have a git post-checkout hook in .git/hooks/post-checkout
which contains the following hook to run git lfs
after each checkout:
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.\n"; exit 2; }
git lfs post-checkout "$@"
I just ran git checkout main
and after literally 3 hrs of running and 27 GB of data downloaded through my internet connection, it failed because my disk was full, at about 97% complete through the git lfs
post-checkout hook operation.
So, I cleared up some disk space.
Now, git checkout main
fails with error:
error: Your local changes to the following files would be overwritten by checkout:
So, I tried running git lfs post-checkout main
(I don't even know if this is a reasonable command--I'm guessing here) manually, and it fails too, with:
This should be run through Git's post-commit hook. Run
git lfs update
to install it.
Is there any way to resume my git lfs
operation so I do NOT have to clear all 27 GB of data just downloaded and start downloading it all over again from scratch (via git reset --hard && git clean -fd && git checkout main
)?
Note that git checkout main
had shown some errors like this as a result of the git lfs
post-checkout hook operation:
error: Your local changes to the following files would be overwritten by checkout:
[list of tons of files]
error: The following untracked working tree files would be overwritten by checkout:
[list of tons of files]
Aborting
0