File size: 711 Bytes
5a5e7a2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
#!/bin/bash
# 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!"
|