From: Chris Koeritz Date: Wed, 6 Feb 2013 16:54:25 +0000 (-0500) Subject: new script for cleaning up old garbage from an active git repo clone. X-Git-Tag: 2.140.90~1120 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=083416823d6a061b791c277a0681f8e43fa4b3a5;p=feisty_meow.git new script for cleaning up old garbage from an active git repo clone. --- diff --git a/scripts/rev_control/compact_git.sh b/scripts/rev_control/compact_git.sh new file mode 100644 index 00000000..abc626a5 --- /dev/null +++ b/scripts/rev_control/compact_git.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +prune_dir="$1" +if [ -z "$prune_dir" ]; then + prune_dir="$(pwd)" +fi +pushd "$prune_dir" +echo cleaning git in directory $(pwd) +git fsck --full +git gc --prune=today --aggressive +git repack +popd