Skip to content

Instantly share code, notes, and snippets.

@HoldYourWaffle
Last active August 13, 2019 08:48
Show Gist options
  • Save HoldYourWaffle/b2b7f8ce71ac73ab7a60c0dc95cbb9dd to your computer and use it in GitHub Desktop.
Save HoldYourWaffle/b2b7f8ce71ac73ab7a60c0dc95cbb9dd to your computer and use it in GitHub Desktop.
Git-clone a huge repository
#!/bin/bash
git clone $1 --depth=1
# cd into the repo directory
a=$1
b="${a##*/}";
cd "${b%.*}"
for i in {1..100000..10}; do git fetch --depth=$i; done
git fetch --unshallow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment