Đi đến nội dung
Lỗi GitLỗi
error: sparse-checkout is not enabled

error: sparse-checkout chưa được bật

Đã thực hiện thao tác sparse-checkout nhưng tính năng này chưa được bật.

gitlinuxwindowsmacos

Nguyên nhân gây ra lỗi này

Bạn cố chỉnh sửa các pattern sparse-checkout mà chưa bật tính năng sparse-checkout trước. Sparse checkout phải được khởi tạo trước khi có thể cấu hình.

Cách sửa

Khởi tạo sparse checkout: git sparse-checkout init --cone. Sau đó đặt các pattern: git sparse-checkout set dir1 dir2. Xác minh bằng: git sparse-checkout list. Dùng --no-cone cho các pattern dựa trên regex.

Ví dụ

git sparse-checkout init --cone
Tài liệu chính thức

Mã lỗi liên quan