[Git] pull,merge conflict error

나준앵·2023년 7월 7일

Git

목록 보기
1/1
post-thumbnail

error: Merging is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm '
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.

작업물을 원격저장소에 커밋하고 풀 받으려다가 CONFLICT 에러가 발생했다

<<<<<<< HEAD

현재 브랜치 충돌 코드 

=======
           
>>>>>>>[브랜치명]

HEAD가 로컬 브랜치에 작성된 부분이고, === 아래 부분이 원격 저장소에 작성되어 있는 부분이다.

해당 파일 내에서 원하는 코드를 선택 한 후

git add 명령어를 사용해 해당 파일을 staging 하고 커밋 하면 merging 표시가 사라지고 merge가 완료 된다.

git add fileName.md
git commit -m "commit message"

git pull origin master
git push origin master
profile
JUNJYEONG

0개의 댓글