Study/Git

Git 병합 시 오류 - 충돌(Auto-merging)

momong'-' 2020. 3. 13. 20:59

Auto-merging src/main/webapp/WEB-INF/views/layout/maintemplate.jsp
CONFLICT (content): Merge conflict in src/main/webapp/WEB-INF/views/layout/maintemplate.jsp
Auto-merging src/main/webapp/WEB-INF/views/layout/main.jsp
CONFLICT (content): Merge conflict in src/main/webapp/WEB-INF/views/layout/main.jsp
Automatic merge failed; fix conflicts and then commit the result.

 

git status 입력 시 both modified라고 적혀있는 파일이 충돌이 난 것(빨간 거..)

들어가면

 

>>>>>>HEAD

"내 소스코드"

==============

"merge하려는 소스코드"

<<<<<<<<<< <merge할 브랜치 명>

위에 코드를 수정한 뒤 (>>> === <<< 이런것도 전부 지우기)

git add "파일명"

git commit 을 하면 자동으로 merge됨