mrrrme-emotion-ai / sync.bat
MichonGoddijn231849
update
e50415a
@echo off
echo ============================================
echo Nuclear Option: Clean Git History
echo ============================================
echo.
echo WARNING: This will rewrite Git history!
echo Make sure you have no other important uncommitted changes.
echo.
set /p CONFIRM="Type YES to continue: "
if /i NOT "%CONFIRM%"=="YES" (
echo Cancelled.
pause
exit /b
)
REM Step 1: Remove file from entire Git history
echo.
echo Step 1: Removing idle-animation.glb from entire Git history...
git filter-branch --force --index-filter "git rm --cached --ignore-unmatch avatar-frontend/public/idle-animation.glb" --prune-empty --tag-name-filter cat -- --all
REM Step 2: Clean up
echo.
echo Step 2: Cleaning up Git...
git reflog expire --expire=now --all
git gc --prune=now --aggressive
REM Step 3: Force push to clear history on both repos
echo.
echo Step 3: Force pushing clean history to GitHub...
git push origin main --force
echo.
echo Step 4: Force pushing clean history to Hugging Face...
git push https://huggingface.co/spaces/michon/mrrrme-emotion-ai main --force
REM Step 5: Setup LFS
echo.
echo Step 5: Setting up Git LFS...
git lfs install
git lfs track "avatar-frontend/public/idle-animation.glb"
git add .gitattributes
git commit -m "Setup LFS tracking for animation"
REM Step 6: Push LFS setup
echo.
echo Step 6: Pushing LFS setup to GitHub...
git push origin main
echo.
echo Step 7: Pushing LFS setup to Hugging Face...
git push https://huggingface.co/spaces/michon/mrrrme-emotion-ai main
REM Step 7: Add the actual file
echo.
echo Step 8: Adding idle-animation.glb with LFS...
git add avatar-frontend/public/idle-animation.glb
git commit -m "Add idle animation via LFS (195KB)"
REM Step 8: Push file to both repos
echo.
echo Step 9: Pushing to GitHub...
git push origin main
echo.
echo Step 10: Pushing to Hugging Face...
git push https://huggingface.co/spaces/michon/mrrrme-emotion-ai main
echo.
echo ============================================
echo Done! File should be accepted now.
echo ============================================
pause