Git #Section02 - The three states of Git
in Study / Etc on Etc
๐ค Introduce
Git์ด ํ์ผ๋ค์ ๋ณ๊ฒฝ์ฌํญ์ ๋ฒ์ ๋ณ๋ก ๊ด๋ฆฌํ๊ธฐ ์ํด์ ํ์ผ๋ค์ ์ด๋ค ์์ผ๋ก ์ธ์ํ๊ณ , ์ด๋ ํ ๋จ๊ณ๋ก ๊ด๋ฆฌํ๋์ง๋ฅผ ์ดํดํ๋ค.
โ๐ป Git์ ์ธ ๊ฐ์ง ์ํ

Git์ 3๊ฐ์ง ์ํ
Working directory
- ์๋ก์ด ํ์ผ ์ถ๊ฐ, ๊ธฐ์กด ํ์ผ์ ๋ณ๊ฒฝ ๋๋ ์ญ์ ๋ก ์ธํ ์์ ๋ด์ญ์ด ์์นํ๋ ๊ณต๊ฐ
- Untracked
- .gitignore์ ์ถ๊ฐ๋ผ์ ๋ฌด์๋๋ ๊ฒฝ์ฐ
- ์๋ก ์์ฑ๋ ํ์ผ(add ๋ ์ ์๋ ๊ฒฝ์ฐ)
- git status ๋ช ๋ น์ด๋ฅผ ํตํด Untracked files ํ์ธ ๊ฐ๋ฅ
- Tracked
- Repository์ ์์ ๋ด์ญ
Staging area
- Repository์ ์์ ๋ด์ญ
- Working directory์์ add ๋ช ๋ น์ด๋ฅผ ํตํด ์์ ๋ด์ญ์ด ๋ด๊ธฐ๋ ๊ณต๊ฐ
- commitํด์ Repository์ ๋ค์ด๊ฐ๊ธฐ ์ ์ค๋น์ํ
Repository
- ์ด๋ฏธ ์ด๋ ํ Version์์ ๋ค์ด์๋ ์ํ
- GitHub์์ ์์ฑํ ์ ์ฅ์๋ฅผ Repository๋ผ ์นญํ๋๋ฐ, ์ด๋ ์ ์ฅ์์๋ ์ด๋ฏธ Commit๋ ๋ด์ญ๋ค์ด ์ ์ฅ๋๊ธฐ ๋๋ฌธ์ด๋ค.
- Commit๋ค์ด ์ ์ฅ๋๋ ๊ณต๊ฐ