Skip to content

Git summary

GitDeveloperKim edited this page May 9, 2022 · 9 revisions

개념 정리

fast-forward

-TBD

rebase

-TBD

명령어 정리

commit 관련 명령어

git commit -m "commit message" : commit시 message 입력
git commit -am "commit message" : add 하면서 message 입력 후 commit

remote 관련 명령어

git remote add [단축이름] [url]

branch 관련 명령어

로컬에서 branch를 생성하고 원격 저장소에 동기화
git branch [브랜치명] : 생성
git checkout [브랜치명] : 이동
git checkout -b [브랜치명] : 생성하면서 이동
git branch origin [브랜치명] : 로컬에 만든 branch 원격 저장소에 반영
git branch --set-upstream-to origin/[브랜치명] : branch local remote 연동
git branch -a : 모든 브랜치 확인
git branch -d [브랜치명] : branch 삭제

push 관련 명령어

git push [remote] [branch] : push 하기

Clone this wiki locally