projects
/
feisty_meow.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
8de72543f7ad3c969e597499ffed720e0a9e50bf
[feisty_meow.git]
/
scripts
/
rev_control
/
compact_git.sh
1
#!/bin/bash
2
3
# compresses the git archive in the folder specified.
4
5
prune_dir="$1"
6
if [ -z "$prune_dir" ]; then
7
prune_dir="$(pwd)"
8
fi
9
pushd "$prune_dir"
10
echo "cleaning git repo in directory $(pwd)"
11
git fsck --full
12
test_or_die "git fsck"
13
git gc --prune=today --aggressive
14
test_or_die "git gc"
15
git repack
16
test_or_die "git repack"
17
popd