Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 18 lines (12 sloc) 430 Bytes
# 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
git repack -adf #--window=200 --depth=50
git prune
Jump to Line
Something went wrong with that request. Please try again.