본문 바로가기
Github

git branch

by anion 2023. 8. 2.

브랜치 생성

git branch 브랜치명

->git branch coupon

 

브랜치로 이동

git switch 브랜치명

->git switch main

 

coupon 브랜치 코드를 main 브랜치에 합치고 싶다

git merge 브랜치명

->git switch main

->git merge coupon 

충돌 발생하면 코드 고치고

->git add & git commit

 

merge 완료된 브랜치 삭제

git branch -d 브랜치

merge 안한 브랜치 삭제

git branch -D 브랜치

'Github' 카테고리의 다른 글

타인과 협업하기(git clone, pull)  (0) 2023.08.02
Github 사용법 (git push)  (0) 2023.08.02
git revert, rest, restore  (0) 2023.08.02
git add, commit  (0) 2023.08.02