로컬 과 원격이 같은 파일을 수정했을 경우 나오는 에러이다.

브랜치를 따로 파서 작업했어야 하지만, 그러지 못할경우에 많이 봐왔다.

 

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

 

1. 해결방법

git status 
git commit -am '커밋내용'

git status 

.......
Unmerged paths:
    (use "git restore --staged <file>..." to unstage)
    (use "git add <file>..." to mark resolution)
           both modified:   파일URL....
           both modified:   파일URL....
.......

위와같이 파일 상태를 확인 할수 있는데, 정상적으로 머지를 못한 파일들이 Unmerged paths 에 나오게 된다.

Auto merge를 못한 파일을 찾아 수정하자

 

git commit -am '커밋내용'   ( = git commit --amend )

최근 커밋한 내용에 추가 하는 명령어를 사용하여 마무리!

 

728x90

+ Recent posts