Saturday, February 15, 2025
HomeGit version controlTìm hiểu về shallow clone trong Git

Tìm hiểu về shallow clone trong Git

Shallow clone là việc clone một repository từ git về với một số lịch sử commit gần nhất mà không lấy toàn bộ lịch sử commit. Điều này giúp quá trình clone nhanh hơn và giảm tiêu tốn tài nguyên.

Hướng dẫn cách dùng shallow clone

Đầu tiên bạn cần clone project về

git clone --depth 1 <repository-url>

Sau đó bạn phải vào thư mục chứa project đã clone và thực hiện lấy toàn bộ commit về

git fetch --unshallow

Nguyễn Minh Châu
Nguyễn Minh Châuhttps://nhatkydev.com
Hi guys ! I'm a software developer. I love programming and new technologies. I create non-professional content on this website, you can only view it for reference purposes.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular