|
|
|
|
|
|
|
|
|
|
|
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 |
|
|
} |
|
|
|
|
|
|
|
|
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 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|