이 문서는 Git을 처음 접하는 개발자가 로컬 작업부터 팀 협업, 배포와 Release까지 전체 흐름을 이해하기 위한 시작점입니다.
전체 흐름
Working Tree
↓ git add
Staging Area
↓ git commit
Local Repository
↓ git push
Remote Repository
feature/*
↓
develop
↓
main
↓
staging
↓
release/tag
↓
production
Git에서 반드시 구분해야 하는 것
- Working Tree: 실제 파일을 수정하는 공간
- Staging Area: 다음 Commit에 포함할 변경을 선택하는 공간
- Local Repository: Commit이 저장되는 로컬 Git 저장소
- Remote Repository: GitHub, GitLab 등의 원격 저장소
- Branch: 독립적인 개발 흐름
- Commit: 변경 이력을 기록한 하나의 버전 단위
학습 단계
- 초급: Repository, Commit, Branch, Remote, Push/Pull
- 중급: Merge, Rebase, Conflict, PR, Stash
- 고급: Release, Tag, Hotfix, Reflog, Cherry-pick, Branch 정책