Last active
October 23, 2024 13:52
-
-
Save HackingGate/bd5335b1f47e71b71f0134ae2fa7e7f2 to your computer and use it in GitHub Desktop.
git incremental clone
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### | |
alias pc4=proxychains4 | |
##### | |
git_incremental_clone() | |
{ | |
REPO=$1 | |
DIR=$2 | |
git clone --recurse-submodules $REPO $DIR --depth=1 | |
cd $DIR | |
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" | |
git fetch --depth=10 | |
git fetch --depth=100 | |
git fetch --depth=1000 | |
git fetch --depth=10000 | |
git fetch --depth=100000 | |
git fetch --depth=1000000 | |
git pull | |
} | |
pc4_git_incremental_clone() | |
{ | |
REPO=$1 | |
DIR=$2 | |
pc4 git clone --recurse-submodules $REPO $DIR --depth=1 | |
cd $DIR | |
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" | |
pc4 git fetch --depth=10 | |
pc4 git fetch --depth=100 | |
pc4 git fetch --depth=1000 | |
pc4 git fetch --depth=10000 | |
pc4 git fetch --depth=100000 | |
pc4 git fetch --depth=1000000 | |
pc4 git pull | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment