git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch v2] documentation: Explain how to free up space after filter-branch
@ 2008-12-22  9:06 Thomas Jarosch
  0 siblings, 0 replies; only message in thread
From: Thomas Jarosch @ 2008-12-22  9:06 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

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

The v2 version of this patch uses "git repack -a -d"
instead of "git repack -a -d --depth=250 --window=250"
as this nocked down a box with 4GB of ram using a repository
with medium sized binary files (50 - 100mb).

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>

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
+git prune
+----------------------------------------------------
+
 
 Author
 ------

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-12-22  9:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-22  9:06 [patch v2] documentation: Explain how to free up space after filter-branch Thomas Jarosch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).