Files
sam-sales/git-auto.ps1
aweso 8f121484d5 영업관리 통합 로그인 명칭수정
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-06 14:06:32 +09:00

53 lines
1.8 KiB
PowerShell

# Git 자동화 스크립트
# 사용법: g "커밋 메시지"
function g {
param(
[Parameter(Mandatory=$true)]
[string]$message
)
Write-Host "========================================" -ForegroundColor Cyan
Write-Host "Git 자동화 시작" -ForegroundColor Cyan
Write-Host "========================================" -ForegroundColor Cyan
Write-Host ""
# 1. git add .
Write-Host "▶ git add . 실행 중..." -ForegroundColor Yellow
git add .
if ($LASTEXITCODE -ne 0) {
Write-Host "❌ git add 실패" -ForegroundColor Red
return
}
Write-Host "✅ git add 완료" -ForegroundColor Green
Write-Host ""
# 2. git commit
Write-Host "▶ git commit 실행 중..." -ForegroundColor Yellow
Write-Host " 메시지: $message" -ForegroundColor Gray
git commit -m "$message"
if ($LASTEXITCODE -ne 0) {
Write-Host "❌ git commit 실패" -ForegroundColor Red
Write-Host " (변경사항이 없거나 이미 커밋된 상태일 수 있습니다)" -ForegroundColor Yellow
return
}
Write-Host "✅ git commit 완료" -ForegroundColor Green
Write-Host ""
# 3. git push
Write-Host "▶ git push 실행 중..." -ForegroundColor Yellow
git push
if ($LASTEXITCODE -ne 0) {
Write-Host "❌ git push 실패" -ForegroundColor Red
Write-Host " (원격 저장소 설정을 확인하세요)" -ForegroundColor Yellow
return
}
Write-Host "✅ git push 완료" -ForegroundColor Green
Write-Host ""
Write-Host "========================================" -ForegroundColor Cyan
Write-Host "✅ 모든 작업 완료!" -ForegroundColor Green
Write-Host "========================================" -ForegroundColor Cyan
}