| ๊ตฌ๋ถ | ๋ช ๋ น์ด | ์์ |
|---|---|---|
init | $ git init | |
add | $ git add [input file or path] | git add . |
commit | git commit -m [input commit message] | |
remote | $ git remote add origin [์ ์ฅ์ url] | |
push | $ git push -u origin [input branch] | git push -u origin master |
pull | $ git pull origin [input branch] | git pull origin master |
clone | $ git clone [์ ์ฅ์ url][๋ค์ด๋ฐ์ ๊ฒฝ๋ก] | |
log | $ git log | |
reset | $ git reset --hard [๋์๊ฐ commit๋ช ] | git reset --hard fd8af3a787b15280bece5c114a4f14f46eb1ea8c |
revert | $ git revert [๋์๊ฐ commit๋ช ] |
| ๊ตฌ๋ถ | ๋ช ๋ น์ด |
|---|---|
config ๋ชฉ๋ก | $ git config --list |
user.name ํ์ธ | $ git config user.name |
user.email ํ์ธ | $ git config user.email |
global user.name ๋ณ๊ฒฝ | $ git config --global user.name "[input user.name]" |
git global user.email ๋ณ๊ฒฝ | $ git config --global user.email "[input user.email]" |
local user.name ๋ณ๊ฒฝ | $ git config --local user.name "[input user.name]" |
local user.email ๋ณ๊ฒฝ | $ git config --local user.email "[input user.email]" |