thank you for your very detailed information.
But i can't get it to work.
That's an odd "feature" of git in my opinion.
I got a lokal git repository and i'm working alone on it. It should be
possible and way way easier to completely remove accidentally committed
files and folders from the history and pack files.
Now i can only delete the whole repo and start all over again. Loosing my
complete commit history.
And in the future i can only pray not to commit any false files and folders
or i can start all over again ;(
Am Mittwoch, 16. Juli 2014 16:30:43 UTC+2 schrieb Dale Worley:
> > How do i remove let's say a "concept_art" folder from all commits (i
> > about 50 commits by now) and from the pack file?
> > I tried many things now. e.g:
> > -
> > - 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:
> First, be aware that what you want to do is intrinsically difficult.
> Git is oriented toward allowing you to manipulate commits, etc. But
> removing objects from storage is not a task that it is designed to
> make easy. I have had a little experience and I think I can provide
> some useful guidance.
> You already know how to recreate all your commits with certain
> directories or files removed:
> git filter-branch --index-filter $SCRIPT HEAD
> You also know how to remove a stored object if it is no longer
> git gc --aggressive --prune=now
> What is difficult is ensuring that you have removed all references to
> the object. In general, this involves removing records of past states
> of the HEAD, and there are a lot of those records. You have to remove
> the record of the previous version of the branch you are manipulating.
> (You have to do this before git-filter-branch, so that
> git-filter-branch actually runs, and after it, to remove the value
> that git-filter-branch put there.) Your command looks to me like it
> should suffice:
> rm -rf .git/refs/original/
> Where I think you have a problem is with the reflog. In the
> repository on which I use git-filter-branch, I have configured
> git config core.logallrefupdates false
> To ensure that no reflog entries are generated. In your case, you use
> git reflog expire --all
> But as far as I can tell from the manual page, that means "examine all
> reflogs to find expired entries". You probably need to add
> "--expire=now" so that all entries are considered expired.
> You can probably examine .git/logs to see if there are any reflog
> entries, and what their values are. My suspicion is that one value
> points to a commit that points to the files you want to excise.
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.