Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'git-gc.sh')
-rwxr-xr-xgit-gc.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/git-gc.sh b/git-gc.sh
new file mode 100755
index 0000000000..e55ed19fbd
--- /dev/null
+++ b/git-gc.sh
@@ -0,0 +1,15 @@
+#!/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 &&
+git-prune &&
+git-rerere gc || exit