팀프로젝트 하는 도중 git develop를 pull을 했지만 다음과 같은 오류가 발생했다.
git pull origin develop
* branch develop -> FETCH_HEAD
error: Your local changes to the following files would be overwritten by merge:
Please commit your changes or stash them before you merge.
Aborting
Updating 379c03b..c571f92
다음과 같은 명령어로 오류를 제거하였다.
git stash
git pull origin develop
* branch develop -> FETCH_HEAD
Updating 379c03b..c571f92
Fast-forward
5 files changed, 130 insertions(+), 86 deletions(-)
git statsh 현재 마무리하지 않은 작업을 스택에 잠시 저장할 수 있는 명령어로 commit하지 않고 나중에 다시 꺼내와 마무리 할 수 있다.
즉 현재 작업을 임시로 저장하는 명령어이다.
[참고자료]
https://steemit.com/develope/@snowsprout/git-git-pull-error-your-local-changes-to-the-following-files-would-be-overwritten-by-merge
https://gmlwjd9405.github.io/2018/05/18/git-stash.html