Git 101
Last updated
Was this helpful?
Last updated
Was this helpful?
what is Git ?
Git is a system for tracking changes in during . It is designed for coordinating work among , but it can be used to track changes in any set of . Its goals include speed, , and support for distributed, non-linear workflows.
Ref)
You need a Github account
Github
์ฝ๊ฒ ๋งํด์, Git ์ ๋ฒ์ ๊ด๋ฆฌ "์์คํ " ์ด๊ณ , github ์ Git ์์คํ ์ ์ ๊ณตํ๋ ํ์ฌ
if you use Window OS, I recommand you Gitbash.
Gitbash
์๋์ฐ์์ bash ๋ฅผ ์ฌ์ฉํ๊ฒ ํด์ค
Powershell ์ปค๋งจ๋์ฐฝ์์๋ git ๋ช ๋ น์ด๋ฅผ ์ฌ์ฉํ ์ ์์ง๋ง, ๊ตณ์ด git ์์ ์๋์ฐ๋ฅผ ์ํด ๋ง๋ git bash ๋ฅผ ์ ์ฐ๊ณ Powershell ์ ์ฌ์ฉํ ์ด์ ๊ฐ ์์
!! ๊น๋ฐฐ์ฌ ์ค์นํ ๋ ์ฐํด๋ฆญ์ผ๋ก ๊น๋ฐฐ์ฌ ์ฌ๋ ์ ํ์ฌํญ์ด ์๋๋ฐ ์ด๊ฑฐ ๊ผญ ํด์ฃผ๊ธธ ๊ถ์ฅํ๋ค.
github ์์ ์์ ์ pjt ๋ค์ repository ๋ณ๋ก ๊ด๋ฆฌํ๋ค.
๋ณดํต ๋ก์ปฌ์์ pjt ์ต์์ ๋๋ ํ ๋ฆฌ๋ฅผ github ์ ์ฐ๊ฒฐํด์ ( init ) ๋๋ ํ ๋ฆฌ๋ฅผ github ์ repository ๋ก ๋์ฐ๋ ๋ฐฉ์์ด์ง๋ง, ๋ github ํ์ด์ง์์ repo ๋ฅผ ๋ง๋ค๊ณ ๋ก์ปฌ๋ก ํด๋ก ํด์ ๋ด ์ฝ๋๋ฅผ ๋ก์ปฌ์ ํด๋ก ๋ repo ๋๋ ํ ๋ฆฌ์ ๋ณต๋ถํ๊ณ push ํ๋ ๋ฐฉ์์ ์ ํธํ๋ค.
์ด์ : ๊ฐ๋จํ๊ณ ์ค๋ฅ๋ ์ผ์ด ์์
pjt ์ ์ด๋ฆ์ repo ์ด๋ฆ์ผ๋ก ์ ํ๊ณ Add a README ์ ์ฒดํฌํ๋๊ฑธ ๊ถ์ฅํ๋ค.
README.md ํ์ผ์ ์ต์๋จ ๋๋ ํ ๋ฆฌ์์ ํ๋ก์ ํธ์ ๋ํ ์ค๋ช ์ ๋ด๋นํ๋ค.
๊ทธ๋ฆฌ๊ณ ๊นํ์์ default branch ๊ฐ ์ธ์ ๊ฐ master ๋ง๊ณ ๋ญ ๋ค๋ฅธ๊ฑธ๋ก ๋์ด์์๋๋ฐ ๋๋ถ๋ถ ๊ฐ๋ฐ์๊ฐ master ๋ธ๋์น๋ฅผ ์ฌ์ฉํ๋ฏ๋ก ์ ๋ ๊ฒ ํด์ฃผ๋๊ฑธ ๊ถ์ฅํจ
๋ง๋ค๊ณ repo ์ ๋ค์ด๊ฐ๋ฉด ์ฐ์ธก์ ์ฝ๋๋ฅผ ๋๋ฅด๋ฉด repo ๋ฅผ clone ํ ์ ์๋ ๊ฒฝ๋ก๋ฅผ ๋ณต์ฌํ ์ ์๋ค.
์ด์ ๋ก์ปฌ๋ก ๋์์์ ๋ด๊ฐ ์ด repo ๋ฅผ clone ์ถ์ ์์น์์ ํฐ๋ฏธ๋์ ์ด์ด์ค๋ค. ( window ๋ ํด๋น ์์น์์ ์ฐํด๋ฆญ์ผ๋ก ๊น๋ฐฐ์ฌ ์ด์ด์ ) ์๋ ๋ช ๋ น์ด๋ฅผ ์ ๋ ฅํ๊ณ ๊ฒฝ๋ก๋ฅผ ๋ณต์ฌํ๋ค.
์ง๊ธ๋ถํฐ ์์๋ฅผ ์ ๊ธฐ์ตํด์ผํจ
์ ์ธ ๊ฐ์ง ๋ช ๋ น์ด๋ฅผ ์ํํ๋ฉด ๋ก์ปฌ์ ๋ด์ฉ์ด github ์ repo ๋ก push ๋๋ ๊ฒ
์ด๊ฑด ๋ญ๋๋ฉด ์ฌ๋ฌ ๋ก์ปฌ์์ ์์ ์ ํ ๊ฒฝ์ฐ ๋ค๋ฅธ ๋ก์ปฌ์์ push ๋ ์ฝ๋๋ฅผ ํ์ฌ ๋ก์ปฌ์ ๋ด๋ ค๋ฐ์ ๋ ์ฌ์ฉํ๋ค.
ํ์ ์ ํ๋ค๋ฉด, ๋ค๋ฅธ ๊ฐ๋ฐ์๊ฐ push ํ ๊ฒ์ ๋ด ๋ก์ปฌ์์ ์ ๋ฐ์ดํธ ํด์ผํ๊ธฐ ๋๋ฌธ์
Git ์ ๋ถ์ฐ ๋ฒ์ ๊ด๋ฆฌ "์์คํ "
Github ์ git ์์คํ ์ ์ ๊ณตํ๋ ๊ณณ
pjt ๋ณ๋ก github ์ repository ์์ ๊ด๋ฆฌํจ
GitHub, Inc. is an that provides for and using .
Ref)
you can download at
Repositories ํญ์ ๋ค์ด๊ฐ๋ฉด ์ฐ์ธก์ New ๋ฒํผ์ ๋๋ฅธ๋ค.