Skip to content

Instantly share code, notes, and snippets.

@hoshomoh
Created July 7, 2019 12:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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