Skip to content

Instantly share code, notes, and snippets.

@shahzadaazam
Forked from cuuupid/a_million_commits.sh
Last active October 16, 2018 23:23
Show Gist options
  • Save shahzadaazam/ebd4b91190adff8a8704aeb2d7178bbf to your computer and use it in GitHub Desktop.
Save shahzadaazam/ebd4b91190adff8a8704aeb2d7178bbf to your computer and use it in GitHub Desktop.
Gitsploit
# a million commits
for Y in {2017..2018}
do
mkdir $Y
cd $Y
for M in {01..12}
do
mkdir $M
cd $M
for D in {01..10}
do
mkdir $D
cd $D
#for i in {01..12}
#do
FLOOR=1;
CEILING=30;
RANGE=$(($CEILING-$FLOOR+1));
RESULT=$RANDOM;
let "RESULT %= $RANGE";
RESULT=$(($RESULT+$FLOOR));
echo "on $M/$RESULT/$Y" > commit.md
export GIT_COMMITTER_DATE="$Y-$M-$RESULT 12:00:00"
export GIT_AUTHOR_DATE="$Y-$M-$RESULT 12:00:00"
git add commit.md -f
git commit --date="$Y-$M-$RESULT 12:00:00" -m "on $M $RESULT $Y"
#done
cd ../
done
cd ../
done
cd ../
done
git push origin master
git rm -rf 20**
git rm -rf 19**
git commit -am "cleanup"
git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment