Skip to content

Instantly share code, notes, and snippets.

@viking
Created February 22, 2016 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save viking/3d2a2bf81ad6eebdb87f to your computer and use it in GitHub Desktop.
Save viking/3d2a2bf81ad6eebdb87f to your computer and use it in GitHub Desktop.
target="beef"; i=0; msg=`git log -1 --pretty="%B"`; while true; do hash=`git rev-parse HEAD`; if [[ $hash == "$target"* ]]; then break; fi; git commit --amend -q -m "$msg$i"; i=$((i+1)); echo $i; if [ $((i % 10000)) -eq 9999 ]; then echo "Cleaning up..."; git gc; fi; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment