From 083416823d6a061b791c277a0681f8e43fa4b3a5 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Wed, 6 Feb 2013 11:54:25 -0500 Subject: [PATCH] new script for cleaning up old garbage from an active git repo clone. --- scripts/rev_control/compact_git.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 scripts/rev_control/compact_git.sh 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 -- 2.34.1