본문으로 이동
Git 에러에러
error: sparse-checkout is not enabled

error: sparse-checkout이 활성화되지 않음

sparse-checkout 작업을 시도했지만 해당 기능이 활성화되어 있지 않습니다.

gitlinuxwindowsmacos

이 에러의 원인

sparse-checkout 기능을 먼저 활성화하지 않고 sparse-checkout 패턴을 수정하려 했습니다. sparse checkout은 구성하기 전에 초기화되어야 합니다.

수정 방법

sparse checkout을 초기화하세요: git sparse-checkout init --cone. 그런 다음 패턴을 설정하세요: git sparse-checkout set dir1 dir2. git sparse-checkout list로 확인하세요. 정규식 기반 패턴에는 --no-cone을 사용하세요.

예제

git sparse-checkout init --cone
공식 문서

관련 에러 코드