DORMANTno replies

[patch] documentation: Explain how to free up space after filter-branch

From: Thomas Jarosch <hidden>
Date: 2016-06-15 22:45:46
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

Explain how to free up space after filter-branch.
Thanks to Björn Steinbrink for pointing me in the right direction.

Signed-off-by: Thomas Jarosch <redacted>
diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
index fed6de6..1432380 100644
--- a/Documentation/git-filter-branch.txt
+++ b/Documentation/git-filter-branch.txt
@@ -319,6 +319,18 @@ git filter-branch --index-filter \
 	 mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' HEAD
 ---------------------------------------------------------------
 
+Free up the space in .git if the rewritten version is correct
+by deleting refs/original and pruning the reflog:
+
+----------------------------------------------------
+git for-each-ref --format='%(refname)' refs/original
+	| xargs -i git update-ref -d {}
+
+git reflog expire --expire=0 --all
+git repack -a -d --depth=250 --window=250
+git prune
+----------------------------------------------------
+
 
 Author
 ------
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help