1
0
mirror of https://github.com/git/git.git synced 2024-11-18 15:03:53 +01:00
git/git-gc.sh

16 lines
265 B
Bash
Raw Normal View History

#!/bin/sh
#
# Copyright (c) 2006, Shawn O. Pearce
#
# Cleanup unreachable files and optimize the repository.
USAGE=''
SUBDIRECTORY_OK=Yes
. git-sh-setup
git-pack-refs --prune &&
git-reflog expire --all &&
git-repack -a -d -l &&
git-prune &&
git-rerere gc || exit