3 ms·
I just tried 2hrs and it only uses 375M git clone \ --single-branch \ --shallow-since '-2 hours' \ --origin 'upstream' \ gh
by dietr1ch 9mo 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
- aidenn0 9mo agoI have a non-shallow clone and the .git directory is less than 3GB.
- dietr1ch 9mo agoOh, 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.
- arikrahman 9mo agoInteresting, 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 https://github.com/NixOS/nixpkgs.git nixpkgs-dorion cd nixpkgs-dorion`