Skip to content

Instantly share code, notes, and snippets.

@hoshomoh
Created July 7, 2019 12:04
Show Gist options
  • Save hoshomoh/f2d241ea17c777748382d120a84465aa to your computer and use it in GitHub Desktop.
Save hoshomoh/f2d241ea17c777748382d120a84465aa to your computer and use it in GitHub Desktop.
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