[Git] branch 생성/삭제 네이밍 규칙

qwe8851·2023년 5월 8일
0

✏️ git

목록 보기
4/14

branch 생성
https://codingapple.com/unit/git-3-branch-and-switch/
생성 git branch 브랜치이름
이동 git switch 브랜치이름
확인 git log --graph --oneline --all
삭제(local) git branch -d 브랜치명
삭제(remote) git push -d origin 브랜치명
main으로 이동 git switch main
merge git merge 브랜치명

conflict발생 시 파일수정 후 git add, git commit


브랜치 복구
삭제한 로컬 브랜치의 커밋 로그 확인 : git reflog
브랜치를 해당 커밋으로 이동 : git branch <branch-name> <commit-hash>
이동한 브랜치를 체크아웃 : git checkout <branch-name>
로컬 브랜치를 다시 원격에 푸시 : git push origin <branch-name>


branch naming 규칙
https://junjunrecord.tistory.com/131


branch 로컬/원격 삭제
https://www.freecodecamp.org/korean/news/how-to-delete-a-git-branch-both-locally-and-remotely/

profile
FrontEnd Developer with React, TypeScript

0개의 댓글