Remix.run Logo
dietr1ch 5 days ago

I just tried 2hrs and it only uses 375M

    git clone \
        --single-branch \
        --shallow-since '-2 hours' \
        --origin 'upstream' \
        gh:NixOS/nixpkgs
What's annoying later is that you MUST remember to always use shallow fetch and hard resets into upstream/$BRANCH

    git fetch \
       --shallow-since '-2 hours' \
       upstream \
       master nixos-unstable
arikrahman 5 days ago | parent | next [-]

Interesting, I have taken a stab at maintaining a repo on the nixpkgs and using a --sparse approach, i.e. `git clone --filter=blob:none --sparse --branch nixos-25.11 https://github.com/NixOS/nixpkgs.git nixpkgs-dorion cd nixpkgs-dorion`

aidenn0 5 days ago | parent | prev [-]

I have a non-shallow clone and the .git directory is less than 3GB.

dietr1ch 5 days ago | parent [-]

Oh, maybe I had a full clone on my laptop before I started doing shallow fetches, but since fetching takes quite a while I've been using a shallow clone on my workstation.