gitignore에서 파일 A는 ! 써서 제외 (원래 와일드카드로 그 디렉터리 전부 ignore 중이었음)


파일 A 스테이징 (add)


-> 커밋


-> update-index --assume-unchanged로 파일 A의 추후 변경 사항 무시


gitignore 수정 (단순 공백 제거)


-> 커밋


-> rebase -i  (스쿼시로 커밋 합침. 여기서 에러 발생)


에러 내용은 다음과 같음


error: Your local changes to the following files would be overwritten by checkout: 파일 A

Please commit your changes or stash them before you switch branches.

Aborting

error: could not detach HEAD


당연히 파일 A는 update-index로 변경사항 무시했기 때문에 커밋할 것도 없고 stash도 안됨

뭐가 문제일까