Git Commands
๐ Run Locally
Frequently used commands. This is a helpful page to Git or Github.
In the git bash
, ์ฌ์ฉ์ ์ด๋ฆ๊ณผ ๋ฉ์ผ ์ค์ :
git config --global user.name "HJ"
git config --global user.mail "floralcustom@gmail.com"
Config check, use:
git config --list
git config user.name
git config --show-origin user.name //์ต์ด ์ค์ ํ์ธ
End of line :
์์คํ
์ค์ ๋๋ก : git config โglobal core.eof native
์์คํ
์ค์ ๋๋ก : git config โglobal core.autcrlf false
Diff result Highlighting :
git config -global pager.diff โdiff-highlight | lessโ
Create Local repository :
mkdir project
cd project
git init
git add *
git commit -m โMy first version managing directoryโ
์ ์ฅ์ ๋ด๋ ค๋ฐ๊ธฐ :
git clone id@์๊ฒฉ์ ์ฅ์_URL
git clone /๋ก์ปฌ์ ์ฅ์/์ ์ฅ์
File ์ํ ํ์ธ(Tracked : Modified/Unmodified/Staged, Untracked : Unstaged) :
git statusgit status -s :
: OO filename
: First O - Staging ์ํ๋ฅผ ๋ณด์ฌ์ค
: Second O - Working directory ์ํ๋ฅผ ๋ณด์ฌ์ค
: M - Modifyed
: A - Added
: ? - Unstaged
Staging Area file์ Unstage๋ก ๋ณ๊ฒฝํ๊ธฐ
git reset HEAD filename
git checkout โ filename
Comments