dothebest0927 avatar

How to Git Error - ~ overwritten by Merge (Remote : GitLAB / GUI TOOL : Sourcetree)

dothebest0927

Published: 21 May 2019 › Updated: 21 May 2019How to Git Error - ~  overwritten by Merge (Remote : GitLAB / GUI TOOL : Sourcetree)

How to Git Error - ~ overwritten by Merge (Remote : GitLAB / GUI TOOL : Sourcetree)

[Git Error] Your local changes to the following files would be overwritten by Merge.

상황 : 원격 저장소에서도 수정 된 파일을 수정 한 경우에 발생

  • Push 권한이 있는 user가 코드를 수정한 상태에서, Origin에서 수정된 코드를 Pull 받으려 할 때
    다음과 같은 메시지를 출력 (overwrite가 일어난 코드를 명시)

해결 방법:

  1. 로컬단에 overwrite된 것에 강제로 pull하기

이 경우에는 Commit된 코드의 내용이 PULL되고, 내가 수정한 부분이 날아가게 된다.

[Git Error] The following untracked working tree files would be overwritten by merge

상황 : Merge 전에 추적되지 않은 파일이 수정되었을 경우 발생

해결방법 :

  1. 수정되어진, 추적되지 않은 파일을 제거하거나 해당 Git 폴더의 경로에서 이동

Leave How to Git Error - ~ overwritten by Merge (Remote : GitLAB / GUI TOOL : Sourcetree) to:

Written by

Read more #git posts


Best Posts From dothebest0927

We have not curated any of dothebest0927's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From dothebest0927