|
|
|
|
|
|
|
|
|
|
|
$env:FILTER_BRANCH_SQUELCH_WARNING = "1" |
|
|
|
|
|
$files = @( |
|
|
"remove_token_from_history.ps1", |
|
|
"add_exaone_with_token.py", |
|
|
"download_exaone_model.py", |
|
|
"install_exaone_direct.py", |
|
|
"install_exaone_simple.py" |
|
|
) |
|
|
|
|
|
Write-Host "Git νμ€ν 리μμ ν ν°μ΄ ν¬ν¨λ νμΌ μ κ±° μ€..." -ForegroundColor Yellow |
|
|
Write-Host "μ£Όμ: μ΄ μμ
μ Git νμ€ν 리λ₯Ό λ€μ μμ±ν©λλ€." -ForegroundColor Red |
|
|
|
|
|
|
|
|
foreach ($file in $files) { |
|
|
Write-Host "`nμ²λ¦¬ μ€: $file" -ForegroundColor Cyan |
|
|
|
|
|
|
|
|
if (Test-Path $file) { |
|
|
|
|
|
$content = Get-Content $file -Raw -Encoding UTF8 -ErrorAction SilentlyContinue |
|
|
if ($content -and $content -match "YOUR_HUGGINGFACE_TOKEN_HERE") { |
|
|
Write-Host " νμ¬ νμΌμμ ν ν° λ°κ²¬, μ κ±° μ€..." -ForegroundColor Yellow |
|
|
$content = $content -replace [regex]::Escape("YOUR_HUGGINGFACE_TOKEN_HERE"), "YOUR_HUGGINGFACE_TOKEN_HERE" |
|
|
Set-Content $file -Value $content -Encoding UTF8 -NoNewline |
|
|
Write-Host " β νμ¬ νμΌμμ ν ν° μ κ±° μλ£" -ForegroundColor Green |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Write-Host " Git νμ€ν 리μμ μ κ±° μ€..." -ForegroundColor Yellow |
|
|
|
|
|
|
|
|
$result = git filter-branch --force --index-filter "git rm --cached --ignore-unmatch `"$file`"" --prune-empty --tag-name-filter cat -- --all 2>&1 |
|
|
|
|
|
if ($LASTEXITCODE -eq 0) { |
|
|
Write-Host " β Git νμ€ν 리μμ μ κ±° μλ£" -ForegroundColor Green |
|
|
} else { |
|
|
Write-Host " β νμ€ν 리 μ²λ¦¬ μ€ν¨ λλ νμΌμ΄ νμ€ν 리μ μμ" -ForegroundColor Yellow |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Write-Host "`nμ²λ¦¬ μ€: EXAONE_μΆκ°_μλ΄.md" -ForegroundColor Cyan |
|
|
|
|
|
if (Test-Path "EXAONE_μΆκ°_μλ΄.md") { |
|
|
$content = Get-Content "EXAONE_μΆκ°_μλ΄.md" -Raw -Encoding UTF8 -ErrorAction SilentlyContinue |
|
|
if ($content -and $content -match "YOUR_HUGGINGFACE_TOKEN_HERE") { |
|
|
Write-Host " νμ¬ νμΌμμ ν ν° λ°κ²¬, μ κ±° μ€..." -ForegroundColor Yellow |
|
|
$content = $content -replace [regex]::Escape("YOUR_HUGGINGFACE_TOKEN_HERE"), "YOUR_HUGGINGFACE_TOKEN_HERE" |
|
|
Set-Content "EXAONE_μΆκ°_μλ΄.md" -Value $content -Encoding UTF8 -NoNewline |
|
|
Write-Host " β νμ¬ νμΌμμ ν ν° μ κ±° μλ£" -ForegroundColor Green |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Write-Host "`nGit νμ€ν 리 μ 리 μ€..." -ForegroundColor Yellow |
|
|
git reflog expire --expire=now --all |
|
|
git gc --prune=now --aggressive |
|
|
|
|
|
Write-Host "`nμλ£!" -ForegroundColor Green |
|
|
Write-Host "μ΄μ λ€μ λͺ
λ Ήμ΄λ‘ κ°μ νΈμνμΈμ:" -ForegroundColor Yellow |
|
|
Write-Host " git push origin master --force" -ForegroundColor Cyan |
|
|
Write-Host " git push space master:main --force" -ForegroundColor Cyan |
|
|
|
|
|
|