Skip to content

Commit 4ba1a32

Browse files
authored
Create git-repack-prune.sh
1 parent 633c677 commit 4ba1a32

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

sh_scripts/git-repack-prune.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
echo "Git Repack and Prune starting..."
3+
4+
git for-each-ref --format="%(refname)" refs/original/ |
5+
xargs -n 1 git update-ref -d
6+
sleep 1
7+
8+
git reflog expire --expire=now --all
9+
echo ""
10+
git repack -ad; git prune
11+
# git repack -a -d -f --depth=250 --window=250

0 commit comments

Comments
 (0)