-
git Downloads
-
git bash ์คํ
-
git config --global user.name "์ด๋ฆ" (git bash์์ ์ ๋ ฅ)
-
git config --global user.email "๊นํ๋ธ ๊ฐ์ email" (git bash์์ ์ ๋ ฅ)
-
git config --list (์ ์ผ ํ๋จ ๋ถ๋ถ์ user.name ๊ณผ user.email์ด ์ ๋๋ก ๋ค์ด๊ฐ๋์ง ํ์ธํ๊ธฐ) (git bash์์ ์ ๋ ฅ)
-
github Repository ๋ง๋ค๊ธฐ
-
VScode์์ ํฐ๋ฏธ๋ ์ด๊ธฐ
-
์ด๊ธฐํ
git init -
์ถ๊ฐํ ํ์ผ ๋ํ๊ธฐ
git add .
ex) git add index.html -
์ ๋ก๋ ๋ ํ์ผ ์ํ ํ์ธ
git status -
ํ์คํ ๋ฆฌ ๋ง๋ค๊ธฐ ex) ์ ๋ชฉ : "first commit"
git commit -m "first commit" -
ํ๋ก์ ํธ ํ์ผ๊ณผ github ๊ณ์ ์ฐ๊ฒฐํ๊ธฐ
ex) git remote add origin https://github.com/ghvhdh333/aaaaa.git
์ด๊ฑฐ๋ ๋น์ทํ ๊ณณ ๋ณต์ฌํด์ ๋ถ์ฌ๋ฃ๊ธฐ -
๋ด ๊ณ์ ๊ณผ ์ฐ๊ฒฐ๋๋์ง ํ์ธ
git remote -v -
github์ ์ ๋ก๋ํ๊ธฐ
git push origin master
-
์ถ๊ฐํ ํ์ผ ๋ํ๊ธฐ
git add . -
ํ์คํ ๋ฆฌ ๋ง๋ค๊ธฐ
git commit -m "first commit" -
github๋ก ์ฌ๋ฆฌ๊ธฐ
git push origin master
-
github์์ ์์ค์ฝ๋ ๋ค์ด๋ก๋
git clone ์ฃผ์ ํด๋์ด๋ฆ
(์ฃผ์๋ ๊นํ๋ธ์์ ๋ค๊ณ ์์ผ ํจ / ํด๋์ด๋ฆ์ ์ ํ์ฌํญ์ด๋ค. (์ฆ ์์ด๋๋จ)
ํด๋์ด๋ฆ์ ์ค ๊ฒฝ์ฐ์๋ ๊ทธ ํด๋๊ฐ ์๋ก ์์ฑ์ด ๋๋ฉด์ ๊ทธ ์์ ์ฝ๋๋ค์ด ๋ค์ด๋ก๋๊ฐ ๋๊ณ ,
ํด๋์ด๋ฆ์ ์์ค ๊ฒฝ์ฐ์๋ ๊นํ๋ธ ํ๋ก์ ํธ ์ด๋ฆ์ผ๋ก ํด๋๊ฐ ์๋์ผ๋ก ์๊ธฐ๊ณ ๊ทธ ์์ ์ฝ๋๋ค์ด ๋ค์ด๋ก๋ ๋๋ค.) -
github์์ ๋ด branch(๋ธ๋ ์น) ๋ง๋ค๊ธฐ
git checkout -b ๋ธ๋ ์น์ด๋ฆ -
๋ด ๋ธ๋ ์น์์ ์์ค์ฝ๋ ์ ๋ฐ์ดํธํ๊ธฐ
git add .
git commit -m "first commit"
git push origin ๋ธ๋ ์น์ด๋ฆ -
๋ง์คํฐ ๋ธ๋ ์น์ ์์ค๊ฐ์ ธ์ค๊ธฐ
git pull origin master
pullํ๊ธฐ ์ ์ ๊ธฐ์กด์ ์์ค์ฝ๋๋ค์ commit์ ๋จผ์ ํด๋์ผ ํ๋ค. -
๋ธ๋ ์น๋ผ๋ฆฌ ์ด๋ํ๋ ๋ฒ
git checkout ๋ธ๋ ์น์ด๋ฆ