# Fix LFS issues by properly migrating files to LFS | |
set -e | |
echo "π§ Fixing LFS issues..." | |
# Create a backup of current state | |
git stash push -m "Backup before LFS fix" | |
# Remove all files from git index (but keep in working directory) | |
git rm -r --cached . | |
# Re-add files, this time respecting .gitattributes LFS rules | |
git add . | |
# Check if there are changes to commit | |
if [ -n "$(git status --porcelain)" ]; then | |
git commit -m "π§ Fix LFS issues: properly migrate files to LFS" | |
echo "β LFS issues fixed and committed" | |
else | |
echo "βΉοΈ No changes detected after LFS migration" | |
fi | |
# Verify LFS status | |
echo "π Current LFS status:" | |
git lfs status | |
echo "π LFS fix complete!" | |