Study_note(zb_data)/Git
์คํฐ๋ ๋ ธํธ (about Git)
KloudHyun
2023. 8. 31. 10:25
๐ Git ์ค์ ๋ช ๋ น์ด
git config --global user.name git_name
git config --global user.email git_email
๐ CRLF
- ์๋์ฐ ์ฌ์ฉ์๋ค์ ์ํด์ ์ค๋ฐ๊ฟ ํ์์ ์๋์ผ๋ก ๋ฐ๊ฟ์ค๋ค
- ๊ฐ์ ธ์ฌ๋ LF๋ฅผ CRLF๋ก, ๋ณด๋ผ๋๋ CRLF๋ฅผ LF๋ก ๋ณ๊ฒฝ
gi config --global core.autocrlf true
๐ ์ ์ฒด ์ค์ ํ์ธ
git config --list
๐ ํญ๋ชฉ๋ณ ์ค์ ํ์ธ
git config <key>
๐ Repository
- git status ๋ช ๋ น์ด ์ต๊ด์ ์ํํ ํ์!
๐งท Git์ ๊ด๋ฆฌํ ๋๋ ํ ๋ฆฌ ์์ฑ
mkdir folder_name
๐งท ํด๋น ํด๋๋ก ์ด๋ ํ, Git init
git init
๐งท git add
git add (file_name)
๐งท Commit
- file์ ์์ ๋ฐ ์๋ฃํ๊ณ github์ ์ ๋ก๋ ํ๊ธฐ ์ํจ
- commit ํ๊ธฐ ์ , ๋ค์ ํ ๋ฒ ํ์ธ
git commit -m "message" file_name
git push origin master #(branch_name ํ์ธ)
๐งท Remote Repository์์ ๊ฐ์ ธ์ค๊ธฐ (pull)
git pull origin master