{"thread":{"id":"16829","subject":"[patch v2] documentation: Explain how to free up space after filter-branch","startedAt":"2008-12-22T09:06:41Z","lastAt":"2008-12-22T09:06:41Z","messageCount":1,"participants":["Thomas Jarosch"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"98540","messageId":"200812221006.45370.thomas.jarosch@intra2net.com","threadId":"16829","inReplyTo":null,"subject":"[patch v2] documentation: Explain how to free up space after filter-branch","fromName":"Thomas Jarosch","fromEmail":"thomas.jarosch@intra2net.com","sentAt":"2008-12-22T09:06:41Z","receivedAt":"2008-12-22T09:06:41Z","isPatch":true,"sender":{"key":"thomas.jarosch@intra2net.com","avatar":"https://avatars.githubusercontent.com/u/1146758?v=4"},"body":"Explain how to free up space after filter-branch.\nThanks to Björn Steinbrink for pointing me in the right direction.\n\nThe v2 version of this patch uses \"git repack -a -d\"\ninstead of \"git repack -a -d --depth=250 --window=250\"\nas this nocked down a box with 4GB of ram using a repository\nwith medium sized binary files (50 - 100mb).\n\nSigned-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>\n\ndiff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-\nbranch.txt\nindex fed6de6..1432380 100644\n--- a/Documentation/git-filter-branch.txt\n+++ b/Documentation/git-filter-branch.txt\n@@ -319,6 +319,18 @@ git filter-branch --index-filter \\\n \t mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' HEAD\n ---------------------------------------------------------------\n \n+Free up the space in .git if the rewritten version is correct\n+by deleting refs/original and pruning the reflog:\n+\n+----------------------------------------------------\n+git for-each-ref --format='%(refname)' refs/original\n+\t| xargs -i git update-ref -d {}\n+\n+git reflog expire --expire=0 --all\n+git repack -a -d\n+git prune\n+----------------------------------------------------\n+\n \n Author\n ------\n"}]}