티스토리 뷰

Java

머징 과정의 Conflict 해결

Alledy 2019. 7. 15. 17:17

Git Conflict 해결

  • 원격저장소에서 다른 분이 작업한 것을 머징하려고 하니 컨플릭트 발생
  • 친절하게 어디서 무슨 컨플릭트가 났는지 다 알려줌
$ git merge origin/[머징하려는 브랜치명]
Auto-merging target/m2e-wtp/web-resources/META-INF/maven/mybook.my/book/pom.properties
CONFLICT (content): Merge conflict in target/m2e-wtp/web-resources/META-INF/maven/mybook.my/book/pom.properties
CONFLICT (modify/delete): src/main/webapp/WEB-INF/views/bookList.jsp deleted in origin/[머징하려는 브랜치명] and modified in HEAD. Version HEAD of src/main/webapp/WEB-INF/views/bookList.jsp left in tree.
Auto-merging src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml
CONFLICT (add/add): Merge conflict in .settings/org.eclipse.core.resources.prefs
Auto-merging .settings/org.eclipse.core.resources.prefs
Auto-merging .classpath
CONFLICT (content): Merge conflict in .classpath
Automatic merge failed; fix conflicts and then commit the result.
  1. CONFLICT (content): Merge conflict in target/m2e-wtp/web-resources/META-INF/maven/mybook.my/book/pom.properties
    • 프로젝트 로케이션 등이 상이하므로 일단 내 것을 남기고 원격 브랜치 것 삭제
  2. CONFLICT (modify/delete): src/main/webapp/WEB-INF/views/bookList.jsp deleted in origin/[머징하려는 브랜치명] and modified in HEAD. Version HEAD of src/main/webapp/WEB-INF/views/bookList.jsp left in tree.
  1. 나머지 클래스패스나 prefs 파일 같은 것은 내버려 두고 git add + commit 하니 머징 완료
  2. 머지 한 뒤 이클립스 껐다 키면 머지된 파일들이 생성되었으나 모든 파일에 에러가 떠있었음
    • clean & 메이븐 프로젝트 업데이트로 해결
    • 서블릿 컨텍스트 파일에 Class not found [config set: /web-context] 식의 에러가 나서 스프링탭의 Remove Spring Project Nature -> Add Spring Project Nature 해서 해결
  3.  
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함