커서 룰 수정
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,7 @@ g "작업 요약 내용"
|
|||||||
```
|
```
|
||||||
|
|
||||||
이 명령어는 `git add .`, `git commit -m "메시지"`, `git push`를 자동으로 실행합니다.
|
이 명령어는 `git add .`, `git commit -m "메시지"`, `git push`를 자동으로 실행합니다.
|
||||||
|
- `git push`는 실패 시 최대 2번까지 자동으로 재시도합니다.
|
||||||
|
|
||||||
### 주의사항
|
### 주의사항
|
||||||
- 사용자가 명시적으로 요청하지 않는 한 실제로 git 명령어를 실행하지 마세요
|
- 사용자가 명시적으로 요청하지 않는 한 실제로 git 명령어를 실행하지 마세요
|
||||||
|
|||||||
30
git-auto.ps1
30
git-auto.ps1
@@ -34,15 +34,29 @@ function g {
|
|||||||
Write-Host "✅ git commit 완료" -ForegroundColor Green
|
Write-Host "✅ git commit 완료" -ForegroundColor Green
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
|
|
||||||
# 3. git push
|
# 3. git push (최대 2번 재시도)
|
||||||
Write-Host "▶ git push 실행 중..." -ForegroundColor Yellow
|
$pushAttempt = 0
|
||||||
git push
|
$maxPushAttempts = 2
|
||||||
if ($LASTEXITCODE -ne 0) {
|
$pushSuccess = $false
|
||||||
Write-Host "❌ git push 실패" -ForegroundColor Red
|
|
||||||
Write-Host " (원격 저장소 설정을 확인하세요)" -ForegroundColor Yellow
|
while ($pushAttempt -lt $maxPushAttempts -and -not $pushSuccess) {
|
||||||
return
|
$pushAttempt++
|
||||||
|
Write-Host "▶ git push 실행 중... (시도 $pushAttempt/$maxPushAttempts)" -ForegroundColor Yellow
|
||||||
|
git push
|
||||||
|
if ($LASTEXITCODE -eq 0) {
|
||||||
|
Write-Host "✅ git push 완료" -ForegroundColor Green
|
||||||
|
$pushSuccess = $true
|
||||||
|
} else {
|
||||||
|
if ($pushAttempt -lt $maxPushAttempts) {
|
||||||
|
Write-Host "⚠️ git push 실패, 재시도 중... ($pushAttempt/$maxPushAttempts)" -ForegroundColor Yellow
|
||||||
|
Start-Sleep -Seconds 2
|
||||||
|
} else {
|
||||||
|
Write-Host "❌ git push 실패 (최대 재시도 횟수 도달)" -ForegroundColor Red
|
||||||
|
Write-Host " (원격 저장소 설정을 확인하세요)" -ForegroundColor Yellow
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Write-Host "✅ git push 완료" -ForegroundColor Green
|
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
|
|
||||||
Write-Host "========================================" -ForegroundColor Cyan
|
Write-Host "========================================" -ForegroundColor Cyan
|
||||||
|
|||||||
Reference in New Issue
Block a user