GESIS-Methods-Hub / andrew

Content Aggregation System for tutorials and vignette of reproducible computational methods.
https://gesis-methods-hub.github.io/andrew/
MIT License
2 stars 0 forks source link

Reduce running time by using `git clone --depth 1` #166

Open rgaiacs opened 1 year ago

rgaiacs commented 1 year ago

git clone --depth 1 do a shallow clone of the repository where only the latest commit is available.

Normal clone

$ git clone git@github.com:GESIS-Methods-Hub/minimal-guide-example-docx.git
remote: Enumerating objects: 47, done.
remote: Counting objects: 100% (47/47), done.
remote: Compressing objects: 100% (34/34), done.
remote: Total 47 (delta 18), reused 31 (delta 10), pack-reused 0
Receiving objects: 100% (47/47), 207.90 KiB | 825.00 KiB/s, done.
Resolving deltas: 100% (18/18), done.

Shallow clone

$ git clone  --depth 1 git@github.com:GESIS-Methods-Hub/minimal-guide-example-docx.git
Cloning into 'shallow'...
remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 10 (delta 0), reused 4 (delta 0), pack-reused 0
Receiving objects: 100% (10/10), 155.26 KiB | 845.00 KiB/s, done.

Limitations

git2r does not support shallow clone: https://github.com/ropensci/git2r/issues/294