본문 바로가기
개념 정리

까먹을까봐 적어두는 git

by 최새벽 2024. 11. 30.

깃허브 설정
git init

 

깃허브에서 레포지토리 만들고 해당 레포지토리로 이동하기
git remote add origin (링크)

 

branch 만들기
git checkout -b (branch name)

 

branch 이동
git checkout (branch name)

 

상태확인
git status

 

업로드할 파일 add
git add (업로드할 문서/폴더명)

 

아래같은 오류 뜰 때

(1)

git config --global core.autoclrf true

 

(2)

git pull origin 브런치명 --allow-unrelated-histories

 

 

커밋
git commit -m "커밋 메시지"

 

push

git push origin (branch namegit.)

 

 

커밋 메시지 작성 (아래가 기본이나, 개발 컨벤션 적용하기)
feat
fix
build
chore
docs
test