Files
ClaudeProjectManager/scripts/fix_website_lfs_and_branch.bat
Claude Project Manager 4dab418f2f Initial commit
2025-07-09 22:10:42 +02:00

46 Zeilen
1.1 KiB
Batchfile

@echo off
echo Fixing website-main LFS and branch issues...
echo.
cd /d "C:\Users\hendr\Desktop\IntelSight\website-main"
echo Step 1: Checking for LFS files...
git lfs ls-files
echo.
echo Step 2: Removing LFS tracking (if any)...
if exist .gitattributes (
echo Backing up .gitattributes...
copy .gitattributes .gitattributes.backup
echo Removing LFS entries...
powershell -Command "(Get-Content .gitattributes) | Where-Object {$_ -notmatch 'filter=lfs'} | Set-Content .gitattributes.temp"
move /y .gitattributes.temp .gitattributes
git add .gitattributes
git commit -m "Remove LFS tracking" 2>nul
)
echo.
echo Step 3: Checking which files are tracked by LFS...
git lfs ls-files
for /f "tokens=3" %%i in ('git lfs ls-files') do (
echo Removing LFS tracking for: %%i
git rm --cached %%i
git add %%i
)
echo.
echo Step 4: Renaming branch from master to main...
git branch -m master main
echo.
echo Step 5: Pushing to main branch...
git push -u origin main --force
echo.
echo Done! If push still fails, try:
echo 1. Delete .git/hooks/pre-push (if exists)
echo 2. Run: git push --no-verify -u origin main
echo.
pause