Skip to content

Instantly share code, notes, and snippets.

@annulen
Created March 27, 2020 21:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save annulen/835ac561e22bedd7138d13392a7a53be to your computer and use it in GitHub Desktop.
Save annulen/835ac561e22bedd7138d13392a7a53be to your computer and use it in GitHub Desktop.

All measurements done with Git 2.26.0

1. Simple shallow clone with partial checkout

REPO="clone-1"
git clone --depth=1 --no-checkout git@github.com:qtwebkit/qtwebkit.git $REPO
cd $REPO
git sparse-checkout init
git sparse-checkout set '/*' '!LayoutTests'

Time:

real 234,06
user 34,66
sys 7,35

.git size: 1.1G

2. Partial clone with full history

REPO="clone-2"
git clone --filter=blob:none --no-checkout git@github.com:qtwebkit/qtwebkit.git $REPO
cd $REPO
git sparse-checkout init
git sparse-checkout set '/*' '!LayoutTests'

Time:

real 286,72
user 47,34
sys 7,87

.git size: 1.2G

3. Partial shallow clone

REPO="clone-3"
git clone --depth=1 --filter=blob:none --no-checkout git@github.com:qtwebkit/qtwebkit.git $REPO
cd $REPO
git sparse-checkout init
git sparse-checkout set '/*' '!LayoutTests'

Time:

real 1032,70
user 298,79
sys 52,29

.git size: 4,1G

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment