gc-wing/.githooks/post-checkout
htlee 918b80e06a chore: 팀 프로젝트 워크플로우 세팅
- pnpm → npm 전환 (워크스페이스 유지)
- .claude/ 팀 규칙(5), 스킬(4), 설정, hooks 스크립트(3) 추가
- .githooks/ commit-msg, post-checkout, pre-commit 추가
- Nexus npm 프록시 설정 (.npmrc — URL만, 인증 제외)
- .editorconfig, .prettierrc, .node-version(24) 추가
- CLAUDE.md 프로젝트 설명서 생성
- Map3D.tsx 미사용 함수 제거 (getDeckShipAngle)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 22:18:40 +09:00

26 lines
942 B
Bash
Executable File

#!/bin/bash
#==============================================================================
# post-checkout hook
# 브랜치 체크아웃 시 core.hooksPath 자동 설정
# clone/checkout 후 .githooks 디렉토리가 있으면 자동으로 hooksPath 설정
#==============================================================================
# post-checkout 파라미터: prev_HEAD, new_HEAD, branch_flag
# branch_flag=1: 브랜치 체크아웃, 0: 파일 체크아웃
BRANCH_FLAG="$3"
# 파일 체크아웃은 건너뜀
if [ "$BRANCH_FLAG" = "0" ]; then
exit 0
fi
# .githooks 디렉토리 존재 확인
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
if [ -d "${REPO_ROOT}/.githooks" ]; then
CURRENT_HOOKS_PATH=$(git config core.hooksPath 2>/dev/null || echo "")
if [ "$CURRENT_HOOKS_PATH" != ".githooks" ]; then
git config core.hooksPath .githooks
chmod +x "${REPO_ROOT}/.githooks/"* 2>/dev/null
fi
fi