Urgent.News

What's breaking now, across thousands of outlets.

Tech

Taming Huge Git Repos: Partial Clone, Sparse-Checkout and Scalar in Practice

Tuần này trên HN có bài về việc Anthropic thiết kế lại hệ thống source control nội bộ. Đọc xong mình thấy quen, vì team nào để monorepo phình lên vài chục GB cũng sẽ gặp đúng những vấn đề đó: git clone mất 40 phút, git status chạy 8 giây, CI thì tốn phần lớn thời gian để kéo code về. Phần lớn chúng ta không cần (và cũng không nên) tự viết VCS riêng. Git bản hiện đại đã có sẵn công cụ để xử lý…

Trong bài viết này, tác giả chia sẻ những kỹ thuật để tối ưu hóa việc làm việc với các repo lớn trong monorepo. Trước khi tối ưu hóa, repo sẽ chậm do nhiều yếu tố như: blob lớn, nhiều file trong working tree và history dài. Tác giả khuyến nghị sử dụng script Python để phát hiện blob lớn trong repo.

Tối ưu hóa monorepo được thực hiện qua hai phương án: partial clone và sparse-checkout. Partial clone giúp tải blob chỉ khi cần thiết, giảm dung lượng download và thời gian download. Hiện tại, partial clone hỗ trợ từ Git 2.22 trở đi.

Sparse-checkout giúp chỉ checkout các file cần thiết cho dự án của mình. Nó có hai mode: cone và pattern. Dùng cone mode giúp tăng tốc trừ khi sử dụng pattern kiểu .gitignore. Kết hợp partial clone và sparse-checkout giúp giảm dung lượng download cho từng team member, mỗi người chỉ cần download vài trăm MB thay vì toàn bộ repo.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Plotkeep — a chart press that never phones home

This is a submission for the Hacktoberfest Open-Source AI Challenge: Week 2 (Side Hustle). Live demo: https://plotkeep-pi.vercel.app/studio Code: https://github.com/sherotree/plotkeep Prize category…

  • Plotkeep converts tables into charts locally without data transmission
  • Uses Gemma model for chart specification and validation
  • Charges $29 one-time fee per operator for GPU-equipped laptops

WebScaly: local video enhancement in Chrome

WebScaly is a free, open-source Chrome extension that applies sharpening, light denoise and upscaling to accessible web video.

  • WebScaly is a free Chrome extension enhancing web videos locally
  • Users can choose Spatial Detail, Anime4K, or FSRCNNX algorithms
  • Extension processes decoded frames at native frame rate without increasing frame rate

More from Tuesday 13 October →