공부일지

[Git]git rebase 하다가 거부당했다... 본문

Computer/공부정리

[Git]git rebase 하다가 거부당했다...

이르리의 공부일지 2023. 11. 24. 12:29

 

 

자주 발생하는 문제!

 

눈물을 흘리게 되는 골치아픈 문제,

 

 

바로 git rebase 할 때 깃으로부터 거부받는 ...

 


 

git pull origin local

 


>>>  ! [rejected]  병합문제 크쿵

hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".



직접 conflicts를 수정한 뒤에 git add 했는데, 

conflicts할 때 문자열로만 표시돼 있는 것들을 그냥 지우는 식으로 했다.

근데 자꾸 충돌이 났다.

충돌 (내용): <filename>에 병합 충돌
error: 다음을 적용할(apply) 수 없습니다

 


manually 수정할 때, '이 내용도 지워야지' 해서 추가로 지워서가 문제였다!
만약 헷갈리면 "양쪽 변경사항 모두 적용"을 선택하자.
수정하고 싶은 내용은 나중에 수정해야지.
버전 올리는 중에 할 필요는 없다.

 

 

다시 반복

 

git pull origin local

<파일 변경사항 직접 수정>

git add .

git rebase --continue

git push origin local