Skip to content

Instantly share code, notes, and snippets.

@hoshomoh
Created Jul 7, 2019
Embed
What would you like to do?
Revert GIT LFS files from repository
git lfs ls-files | cut -d ' ' -f 3 > lfs-files.txt
while read file; do
git lfs untrack "$file";
git rm --cached "$file";
git add --force "$file";
done <lfs-files.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment