# Git 원격 저장소 설정 스크립트 # 사용법: .\setup_remote.ps1 Write-Host "=== Git 원격 저장소 설정 ===" -ForegroundColor Cyan Write-Host "" # 현재 원격 저장소 확인 $currentRemote = git remote -v if ($currentRemote) { Write-Host "현재 원격 저장소:" -ForegroundColor Yellow Write-Host $currentRemote Write-Host "" $overwrite = Read-Host "원격 저장소가 이미 있습니다. 덮어쓰시겠습니까? (y/n)" if ($overwrite -ne "y") { Write-Host "취소되었습니다." -ForegroundColor Red exit } git remote remove origin } # 원격 저장소 URL 입력 Write-Host "" Write-Host "원격 저장소 URL을 입력하세요:" -ForegroundColor Green Write-Host "예시: https://github.com/username/soy-nv-ai.git" -ForegroundColor Gray Write-Host " git@github.com:username/soy-nv-ai.git" -ForegroundColor Gray Write-Host "" $remoteUrl = Read-Host "원격 저장소 URL" if ([string]::IsNullOrWhiteSpace($remoteUrl)) { Write-Host "URL이 입력되지 않았습니다. 취소합니다." -ForegroundColor Red exit } # 원격 저장소 추가 Write-Host "" Write-Host "원격 저장소를 추가하는 중..." -ForegroundColor Yellow git remote add origin $remoteUrl # 원격 저장소 확인 Write-Host "" Write-Host "원격 저장소가 추가되었습니다:" -ForegroundColor Green git remote -v # 푸시 여부 확인 Write-Host "" $push = Read-Host "마스터 브랜치를 원격 저장소에 푸시하시겠습니까? (y/n)" if ($push -eq "y") { Write-Host "" Write-Host "푸시하는 중..." -ForegroundColor Yellow git push -u origin master Write-Host "" Write-Host "푸시가 완료되었습니다!" -ForegroundColor Green } else { Write-Host "" Write-Host "푸시를 건너뛰었습니다. 나중에 다음 명령으로 푸시할 수 있습니다:" -ForegroundColor Yellow Write-Host " git push -u origin master" -ForegroundColor Cyan } Write-Host "" Write-Host "=== 완료 ===" -ForegroundColor Green