pull --rebase, stash pop 하다가 작업한 파일도 아닌데 꼬이는 경우가 있다. 

$ git reset --hard
Encountered n files(s) that should have been pointers, but weren't

reset 을 해도 위와 같은 메시지만 보이고 해결이 되지 않았다.

검색해보니 lfs 때문에 발생하는 것 같다.

$ git lfs uninstall
$ git reset --hard
$ git lfs install
$ git lfs pull

lfs 를 uninstall 하고 reset 후에 재설치하라는 것 같은데 별 효과가 없었다.

$ git rm --cached -r .
$ git reset --hard
$ git rm .gitattributes
$ git reset .
$ git checkout .

나 같은 경우에는 위와 같이 진행했을 때 git 폴더를 다시 사용할 수 있었다.

불행히도 작업하던 파일은 다 날려버렸다. :( 위와 같은 리셋 전에 일단 작업하던 파일부터 따로 복사 후에 시도해보자.

출처 : https://stackoverflow.com/questions/46704572/git-error-encountered-7-files-that-should-have-been-pointers-but-werent

 

Git error: Encountered 7 file(s) that should have been pointers, but weren't

How to clean repo, if staged files marked as modified? After git reset --hard I get Encountered 7 file(s) that should have been pointers, but weren't: Running git clean -fdx doesn't help, either.

stackoverflow.com

 

728x90

+ Recent posts