On Tue, Jul 15, 2014 at 07:46:52AM -0700, cemico wrote:
> Hello Tower team,
> I have a git project in which all files are of about 700 MB size.
> In the .git folder lies a "pack" file which is 1.13 GB (Gigabyte)
> I accidently commited files and folders, which don't have to be under 
> version control.
> How do i remove let's say a "concept_art" folder from all commits (i have 
> about 50 commits by now) and from the pack file?
> I tried many things now. e.g:
> - http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/
> - http://rtyley.github.io/bfg-repo-cleaner/
> - filter-branch with "rm"
> - git gc with prune=now and aggresive
> and the thing i thought which must really work:
> http://git-scm.com/book/en/Git-Tools-Rewriting-History#The-Nuclear-Option:-filter-branch
> None of the above work as expected or better: None work like i need it to 
> work.
> Some delete all commits (the most do that), some don't delete the files 
> from all commits, all(!) don't make the "pack" file smaller after deleting 
> all files and folders i don't want.
> What i need is:
> - Exclude files and folders from my repo
> - Delete all references to theses files and folders from all commits
> - But don't delete any old commit
> - Rewrite the pack file, so that not any of the excluded files and folders 
> are in it
> What is the way to achieve that?

`filter-branch` is the tool to alter history in a repo, but it's not
easy to wield.  It'd be easier to help you if you answer these

1. Say that you were to rewrite a changeset manually using `git rebase -i`
   and marking it 'e', what shell commands would you use to modify the

2. Exactly what arguments did you pass to `git filter-branch`?


Magnus Therning                      OpenPGP: 0xAB4DFBA4 
email: mag...@therning.org   jabber: mag...@therning.org
twitter: magthe               http://therning.org/magnus

Most software today is very much like an Egyptian pyramid with
millions of bricks piled on top of each other, with no structural
integrity, but just done by brute force and thousands of slaves.
     -- Alan Kay

Attachment: pgpzlV6VzP_f4.pgp
Description: PGP signature

Reply via email to