Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 3189444a33
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 18 lines (12 sloc) 0.43 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/bin/sh

# The job of git-flush is to recompactify your repository to be as small
# as possible, by dropping all reflogs, stashes, and other cruft that may
# be bloating your pack files.

rm -fr .git/refs/original
perl -i -ne 'print unless /refs\/original/;' .git/info/refs .git/packed-refs

git reflog expire --expire=0 --all

if [ "$1" = "-f" ]; then
git stash clear
fi

git repack -adf #--window=200 --depth=50
git prune
Something went wrong with that request. Please try again.