상황
1. 브랜치 이름을 branch1이라고 가정할 때 branch1에서 작업 후 git push origin branch1
2. PR을 올렸지만 conflicts로 인한 Rebase and Merge 불가
3. 인텔리제이에서 충돌 해결 후 다시 push -> 그러나 깃허브에선 계속 conflicts가 있다고 떴다.
해결 과정
1. branch1 브랜치에서 -> git pull --rebase origin main
2. 충돌된 코드 수정하여 해결
3. git add .
4. git rebase --continue
5. 완료되면 git push origin branch1 --force
6. 깃허브로 돌아가서 PR 확인해보면 충돌이 해결되어있다~!
git pull --rebase origin main
(충돌 해결)
git add .
git rebase --continue
git push origin branch1 --force
* PR Merge 후에 할 일
깃허브
-> 브랜치 삭제
인텔리제이
-> git checkout main
-> git branch -D branch1
-> git fetch --prune
'공부 기록 > 오류 기록' 카테고리의 다른 글
This method cannot decide whether these patterns are Spring MVC patterns or not 오류 해결 (0) | 2023.08.29 |
---|---|
윈도우 환경에서 H2 데이터베이스 연결 시 경로 not found 오류 해결 (0) | 2023.06.11 |
Updates were rejected because the tip of your current branch is behind 오류 해결 (0) | 2023.04.30 |
Java file outside of source root 오류 해결 (0) | 2023.04.30 |