🐱Git

rebase시 conflict 해결하기

JerryiOS 2024. 4. 24. 10:24

해결과정


1. 먼저 합치기 원하는 브랜치를 rebase한다.

 

2. conflict 났는지 확인해보고 conflict가 있다면 vscode를 통해 conflict를 해결해주고 저장한다.

 

3. 수정 후 명령어를 통해 rebase과정을 끝마친다.


4. git push origin head --force-with-lease 명령어를 통해 강제로 push를 진행한다.
(--force-with-lease를 사용하면 '새로운 commit이 존재하는 경우에 강제로 push하는 것'을 막아준다.)

 

출처


https://baeji77.github.io/dev/git/etc/git-rebase-and-confilct-resolve/

 

Git rebase와 친해지기 (git conflict를 해결하는 방법 & upstream에서 rebase하기)

How to resolve git conflict by using git rebase

baeji77.github.io

 

반응형