Remove LFS tracking for all files

This commit is contained in:
Joe Dong
2023-05-11 19:15:00 +08:00
parent b76321de62
commit a80aa2434c
2 changed files with 16 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/bin/bash
set -e
# Untrack and remove all LFS files from the repository
git lfs ls-files | while read -r line; do
filename="$(echo "$line" | awk '{print $2}')"
echo "Processing $filename"
git lfs untrack "$filename"
git lfs checkout "$filename"
done
# Commit changes
git add --all
git add .gitattributes
git commit -m "Remove LFS tracking for all files"