Git command

DAEPANGยท2023๋…„ 3์›” 10์ผ

๐Ÿ‘‰ Git command


๐Ÿ•น๏ธ Control

๊ตฌ๋ถ„๋ช…๋ น์–ด์˜ˆ์‹œ
init$ git init
add$ git add [input file or path]git add .
commitgit 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

๊ตฌ๋ถ„๋ช…๋ น์–ด
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]"
profile
hello, daepang

0๊ฐœ์˜ ๋Œ“๊ธ€