안드로이드

[Android/Git] Project Pull 할 때 "Your local changes would be overwritten by merge. Commit, stash or revert them to proceed." 간단하게 해결해보기

란서 2022. 1. 3. 13:28

 여러 컴퓨터에서 공유하고 수정하는 프로젝트를 다룰 때, 해당 프로젝트가 변경 됐을 시 pull 해야 하는 상황이 있다.

Pull

 

그런데 다음과 같은 메시지가 뜨면서 실패한다면, 다음과 같은 과정을 거치자.

 

Your local changes would be overwritten by merge. Commit, stash or revert them to proceed

 

안드로이드 스튜디오 Terminal (Alt + F12 - Window기준) 창을 키고,

명령어 "git stash"

이렇게 치면

 

이런식으로 메세지가 나오면서 Pull이 잘 작동한다.

그런데도 안되면,

명령어 git add -A

을 치면 잘되더라.