Git command

DAEPANG·2023년 3월 10일
0
post-thumbnail

👉 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개의 댓글