| name | git-push |
| description | Use when user says "push", "push to remote", "푸시해줘", or wants to send committed changes to remote. Do NOT use for commit creation (use git-commit) or commit-and-push (use git-commit-and-push). |
Git Push Guide
안전하고 체계적인 Git Push를 위한 가이드
Pre-Push Checklist
git status
git fetch origin
git log origin/$(git branch --show-current)..HEAD --oneline
git diff HEAD...origin/$(git branch --show-current)
Push Strategies
Standard Push
git push origin $(git branch --show-current)
git push -u origin $(git branch --show-current)
Sync Before Push (원격에 새 커밋 있을 때)
git pull --rebase origin $(git branch --show-current)
git pull origin $(git branch --show-current)
Force Push (주의!)
git push --force-with-lease origin $(git branch --show-current)
Protected Branches
다음 브랜치는 직접 push 전 확인 필요:
main, master
develop, release
production
Never Push
- 컴파일/테스트 실패 코드
- 100MB 이상 파일
- Credentials, API keys,
.env files
- Generated files (node_modules, .pyc, build/)
Recovery
git revert HEAD
git push origin branch
git pull --rebase origin branch
git push origin branch