티스토리 뷰

회사에서 git을 사용하다가

오래전 stash 해둔 내역을 git stash apply 했다가 깃이 충돌했다

 

아래와 같이 뜸

committing is not possible because you have unmerged files

 

 

충돌 원인은 원격(remote)에는 이미 삭제하고 없는 파일이

git stash로 불러와졌기 때문

 

파일 삭제도 안되고 커밋도 안되고 아무것도 안되는 상황이 되었다

 

 

먼저 git status 로 충돌 내역 확인

 

unmerged paths 이렇게 뜨면 깃이 충돌된 것,,

 

나의 경우 아래와 같이 떴다

unmerged paths:
use "git add/rm <file>..." as appropriate to mark resolution
use "git restore --staged <file>..." to unstage

deleted by us: 파일 URL~~



해결 : 
git rm --force <file> 사용해 해당 파일을 강제 삭제해 해결

공지사항