Skip to content

Instantly share code, notes, and snippets.

@clausecker
Created November 17, 2013 23:01
Show Gist options
  • Save clausecker/7519459 to your computer and use it in GitHub Desktop.
Save clausecker/7519459 to your computer and use it in GitHub Desktop.
#!/bin/bash
# usage: bench.sh <number of commits>
FILE=foo
BENCHDIR=bench-$1
git init $BENCHDIR
cd $BENCHDIR
for ((i = 0; i < $1; i++)); do
date >>$FILE
git add $FILE
git commit -m "" --allow-empty-message -q
git gc --auto
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment