Home / git / git rm실패시 강제삭제 해주는 방법

git rm실패시 강제삭제 해주는 방법

March 22, 2021 · 1 min read git
git rm -r ./xx
fatal: pathspec './hoge' did not match any files

git rm시 아래와 같은 에러가 나온다면 아래와 같이 –ignore-unmatch옵션을 추가해 주자.

git rm -r --ignore-unmatch  ./xx
–ignore-unmatch

--ignore-unmatch옵션은 Git에 등록되어있지 않는 파일을 강제삭제해준다.