git pull 시 문제해결

git pull 시 문제해결

아래는 git pull 을 하면 가끔 발생하는 에러들입니다.자주 까먹어서 헤메는 내용이라 정리해둡니다.

error: Your local changes to the following files would be overwritten by merge:

[파일들...]

Please, commit your changes or stash them before you can merge.error: The following untracked working tree files would be overwritten by merge:

[파일들...]

Please move or remove them before you can merge.

첫번째 에러는 "Please, commit your changes or stash them before you can merge."

commit 하거나 stash 하라고 하는데요.저의 경우 git pull 은 보통 원격저장소의 내용으로 덮어 씌우는 경우가 많아서

git stash

git pull

하여 해결합니다.

두번째 에러는 "Please move or remove them before you can merge."

문제가 되는 파일들을 이동하거나 지우라고 하는데요.

git stash 하여도 해결되지 않습니다.