summaryrefslogtreecommitdiff
path: root/git-prune-script
diff options
context:
space:
mode:
Diffstat (limited to 'git-prune-script')
-rwxr-xr-xgit-prune-script2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-prune-script b/git-prune-script
new file mode 100755
index 0000000..d0f19f1
--- /dev/null
+++ b/git-prune-script
@@ -0,0 +1,2 @@
+#!/bin/sh
+fsck-cache --unreachable $(cat .git/HEAD ) | grep unreachable | cut -d' ' -f3 | sed 's:^\(..\):.git/objects/\1/:' | xargs rm