• commit & push everything
  • remove hooks: git lfs uninstall
  • remove lfs stuff from .gitattributes
  • list lfs files using git lfs ls-files | sed -r 's/^.{13}//' > files.txt into a “files.txt”.
  • run git rm --cached for each file: while read line; do git rm --cached "$line"; done < files.txt
  • run git add for each file while read line; do git add "$line"; done < files.txt
  • commit everything
    git add .gitattributes
    git commit -m "unlfs"
    git push origin
    
  • check that no lfs files left
    git lfs ls-files
    remove junk
    rm -rf .git/lfs