본문 바로가기

trouble-shooting

git clone 오류 error: invalid path

작업하던 리포지토리를 다른 로컬 환경에서 테스트해보려고 클론을 했는데 오류가 났다.

Cloning into '{my_local_directory_path}'...
remote: Enumerating objects: 252, done.        
remote: Counting objects: 100% (252/252), done.        
remote: Compressing objects: 100% (155/155), done.        
remote: Total 252 (delta 133), reused 194 (delta 87), pack-reused 0 (from 0)        
Receiving objects: 100% (252/252), 172.89 KiB | 5.08 MiB/s, done.
Resolving deltas: 100% (133/133), done.
error: invalid path 'src/types/media.d.ts '
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

분명 커밋할때도 문제 없었는데?? 에러를 살펴보니 invalid path란다. 자세히 보니 파일 이름 끝에 공백이 들어가있다.

"src/types/media.d.ts " 끝 부분 공백을 제거하고 다시 머지해줬다. 이후 잘 클론이 된다.