본문 바로가기

내일배움캠프 4기 - Node.js

[8 - 3일차] 내가 쓰는 Git 명령어 모음

 

GIT 명령어

 

git init // 깃 저장소 생성
git status // 현재 상태
git clone 깃주소 // 원격저장소 클론
git branch // 브랜치 확인
git branch 브랜치명 // 브랜치 생성
git checkout 브랜치명 // 해당 브랜치로 이동
git add . //파일 전체추가
git commit -m "커밋메시지" //커밋생성
git push origin 브랜치명 // 원격브랜치 푸시
git pull // 원격저장소 내용 가져오기
git remote update // 원격저장소 업데이트
git merge 다른브랜치 // 현재브랜치에 다른브랜치 머지
git merge -Xtheirs branchname //헤드 기준 으로 상대 우선 머지
git merge -XOurs branchname //헤드 기준 으로 자기 우선 머지