2

Possible Duplicate:
git - remove file from the repository

I just realised that my binaries have been version-controlled since I started my git repository, which has resulted in a .git of 10MB -- way too large for 40 revisions of a small project.

How can I retroactively remove these files from the repository? A simple git removal would not remove their history, so they would keep taking up space.

I'm using TortoiseGit with Unfuddle.

Community
  • 1
  • 1
Andy
  • 21
  • 1
  • 2
  • 2
    Found the answer but can't answer my own question. [Remove sensitive data](http://help.github.com/remove-sensitive-data/): `git filter-branch --index-filter 'git rm --cached --ignore-unmatch -r bin'` – Andy Aug 08 '11 at 07:58
  • see http://stackoverflow.com/questions/2730411/git-remove-file-from-the-repository – Jonas Heidelberg Aug 08 '11 at 08:19
  • 1
    Why do you think you can't post the answer yourself? You should be able to... – Jonas Heidelberg Aug 08 '11 at 08:20
  • 3
    @Jonas: "Oops! Your answer couldn't be submitted because: Users with less than 100 reputation can't answer their own question for 8 hours after asking. You may self-answer in 7 hours. Until then please use comments, or edit your question instead." – Andy Aug 08 '11 at 08:47
  • see also [git remove credentials from repository](http://stackoverflow.com/questions/2175881/git-remove-credentials-from-repository) – mbx Aug 08 '11 at 18:51

1 Answers1

1

This calls for git filter-branch. You will be able to get rid of the files you never intended on tracking.

Take a look here for more information:

http://git-scm.com/docs/git-filter-branch

Hope this helps.

Adam Dymitruk
  • 124,556
  • 26
  • 146
  • 141