How to revert to an earlier commit on a repo?
I’ve checked the docs and I don’t see anywhere how I can revert to an earlier commit. I know how to do this with git, but I don’t want to download or checkout such large files.The hash of the earlier commit is easily accessible.
2023-12-14T03:27:05Z
hi@RonanMcGovern,I looks like you don’t have a copy of the repo locally right?You could try usingGIT_LFS_SKIP_SMUDGE=1to only copy references to LFS, then you reset to a specific commit hash, and force push? Make sure you duplicate your space/dataset/model before testing this, here is aduplicatorgit lfs install
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/USER/REPO
git reset --force HASH
git push --force
2023-12-14T10:55:46Z
Ah this is much appreciated@radames, thanks
2024-01-26T03:25:32Z
Instead ofgit reset --force HASH, shouldn’t the command begit reset --hard HASH?
2024-01-26T11:52:14Z
yeah, thanks for that:git lfs install
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/USER/REPO
cd REPO
git reset --hard HASH
git push --force