로컬 과 원격이 같은 파일을 수정했을 경우 나오는 에러이다.
브랜치를 따로 파서 작업했어야 하지만, 그러지 못할경우에 많이 봐왔다.
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
'Git' 카테고리의 다른 글
[git] remote branch 가져오기 (0) | 2022.03.11 |
---|---|
[git] 리모트 저장소와 브랜치 최신화 하기 (0) | 2021.12.03 |
[error] The project you were looking for could not be found or you don't have permission to view it. (0) | 2021.08.07 |
[error]This is probably not a problem with npm. There is likely additional logging output above. (0) | 2021.03.08 |
[Git]로컬에 깃에 올라간 프로젝트로 강제 덮어쓰기 (0) | 2021.03.08 |