git

[git] merge 충돌 에러

jiheek 2022. 5. 18. 12:53

* 에러 내용:

두 가지 경우가 있었다.

 

(1) error: Your local changes to the following files would be overwritten by merge:
        ~file 리스트~
Please commit your changes or stash them before you merge.


(2) error: The following untracked working tree files would be overwritten by merge:
        ~file 리스트~
Please move or remove them before you merge.
Aborting

 

기존에 내가 바꾼 내용과 merge할 commit에서 바뀐 내용이 일치하지 않았기 때문이다.

 

* (1) 에러 해결:

git stash
git pull

* (2) 에러 해결:

git add -A
git stash 
git pull

 

git stash 설명 참고

https://gmlwjd9405.github.io/2018/05/18/git-stash.html

 

[Git] git stash 명령어 사용하기 - Heee's Development Blog

Step by step goes a long way.

gmlwjd9405.github.io

 

 

'git' 카테고리의 다른 글

[git] remote repo commit 삭제하기  (0) 2022.03.21
[git] git status, staging area  (0) 2022.03.21
[git] Fork 협업 플로우  (0) 2022.03.21
[git] Forked repo에서 origin repo pull하기  (0) 2022.03.08
[git] .gitignore 파일/폴더 ignore하기  (0) 2022.03.04