Skip to main content

Git 다시 지정 후 병합 충돌 해결

git rebase 작업을 수행할 때 일반적으로 커밋을 이동합니다. 이로 인해 병합 충돌이 유도되는 상황이 생길 수 있습니다. 즉, 커밋 중 두 개에서 동일한 파일의 동일한 줄을 수정했으며 Git에서 적용할 변경 내용을 알지 못한다는 의미입니다.

git rebase를 사용하여 커밋을 다시 정렬하고 조작한 후 병합 충돌이 발생하면 Git은 터미널에 다음 메시지를 출력하여 알려줍니다.

error: could not apply fa39187... something to add to patch A

When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
Could not apply fa39187f3c3dfd2ab5faa38ac01cf3de7ce2e841... Change fake file

여기서 Git은 충돌을 일으키는 커밋을 알려 줍니다(fa39187). 다음 세 가지 옵션이 제공됩니다.

  • git rebase --abort를 실행하여 다시 지정을 완전히 실행 취소할 수 있습니다. Git은 git rebase 호출 이전의 분기 상태로 되돌립니다.
  • git rebase --skip을 실행하여 커밋을 완전히 건너뛸 수 있습니다. 즉, 문제가 있는 커밋에 의해 도입된 변경 내용은 포함되지 않습니다. 이 옵션을 선택하는 경우는 매우 드뭅니다.
  • 충돌을 해결할 수 있습니다.

충돌을 해결하려면 명령줄에서 병합 충돌을 해결하기 위한 표준 절차를 따를 수 있습니다. 완료되면 Git에서 다시 지정의 나머지를 계속 처리할 수 있도록 git rebase --continue를 호출해야 합니다.

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy