So, it has been an interesting journey, but time to remove git-lfs. Here follows a summary of the approach I used to safely remove git-lfs,
- commit & push everything
- create a branch, something like fix/remove-lfs
- remove hooks
git lfs uninstall - remove lfs stuff from .gitattributes (open file, delete content - don't delete the file!)
- list all lfs files,
git lfs ls-files - run the commands
git lfs untrack '<pattern>' (in my case, all files "*.*")
git add --renormalize .
git commit -m 'Restore file contents that were previously in LFS'
- run a
git statusand make sure all the files were added properly - commit everything