DOCS/journey/troubleshooting/250920_happybell80_gateway_git_sync_issue.md
Claude-51124 22557e7132 docs: 오래된 트러블슈팅 아카이브 및 구조 정리
- 7-8월 초기 구축 문서 12개를 _archive/troubleshooting/2025_07-08_initial_setup/로 이동
- book/300_architecture/390_human_in_the_loop_intent_learning.md를 journey/research/intent_classification/로 이동 (개발 여정 문서)
- 빈 폴더 제거 (journey/assets/*)
2025-11-17 14:06:05 +09:00

1.3 KiB

Gateway Git 동기화 이슈

작성일: 2025-09-20

작성자: happybell80

발생 상황 (2025-09-20)

  • git status에서 이미 커밋된 파일이 "untracked files"로 표시
  • 실제 파일은 최신이지만 git 히스토리는 8월 20일 상태

조사 결과

시간대별 분석

  • 8월 20일: 마지막 정상 git pull
  • 9월 15일: rate_limiter.py 커밋/push
  • 9월 20일 00:18: Actions 자동 배포
  • 9월 20일 00:28: git pull 충돌 발생

원인 발견

Actions deploy.yml에서 rsync --exclude='.git' 사용

  • 파일은 복사되지만 .git 폴더는 제외
  • 결과: 파일 시스템은 최신, git 히스토리는 과거

실제 상황

폴더 파일: rate_limiter.py (9월 15일 버전)
.git HEAD: 8월 20일 (rate_limiter.py 없음)
git 인식: "누가 만든지 모르는 새 파일"

교훈

배포된 파일 ≠ git 히스토리

  • Actions rsync는 파일만 업데이트
  • 컨테이너는 최신 코드지만 git은 과거 상태 가능
  • 서버 작업 시 git status 필수

해결 방법

git fetch origin
git reset --hard origin/main

장단점

현재 방식 장점

  • 로컬 충돌 없이 깨끗한 배포
  • 백업/롤백 용이
  • git 문제로 배포 실패 방지

단점

  • git 히스토리 관리 시 추가 작업 필요