projects
/
feisty_meow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8ec5aa
)
new script for cleaning up old garbage from an active git repo clone.
author
Chris Koeritz
<fred@gruntose.com>
Wed, 6 Feb 2013 16:54:25 +0000
(11:54 -0500)
committer
Chris Koeritz
<fred@gruntose.com>
Wed, 6 Feb 2013 16:54:25 +0000
(11:54 -0500)
scripts/rev_control/compact_git.sh
[new file with mode: 0644]
patch
|
blob
diff --git a/scripts/rev_control/compact_git.sh
b/scripts/rev_control/compact_git.sh
new file mode 100644
(file)
index 0000000..
abc626a
--- /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