3

I found out that it wasn't such a good idea to keep tracking the binary. The size of our repository is growing at a much faster rate than I would like. Is it possible to purge this file from git?

No one even needs to know it existed.

flumpb
  • 1,707
  • 3
  • 16
  • 33
  • @svick you're right. Is there something I can do? Should I delete the post? – flumpb Mar 07 '12 at 14:44
  • That's up to you. You can delete this question if you think it won't be useful to anyone. Or you can let others close it. – svick Mar 07 '12 at 14:53
  • Duplicate of [Completely remove file from all Git repository commit history](http://stackoverflow.com/questions/307828/completely-remove-file-from-all-git-repository-commit-history) and [How to remove/delete a large file from commit history in Git repository?](http://stackoverflow.com/questions/2100907/how-do-i-purge-a-huge-file-from-commits-in-git-history). –  Apr 04 '14 at 00:49

3 Answers3

3

Theres a tool called BFG especially made for this task.

it has the advantage that sha1's referenced in commit messages will be updated too!

While being written in scala its easy to setup and run as a command line program.

ideasman42
  • 42,413
  • 44
  • 197
  • 320
2

You'll want to use git filter-branch to rewrite the repository. You'll need to synchronize it across all users though and have a stop/restart day.

Wes Hardaker
  • 21,735
  • 2
  • 38
  • 69
2

See these fine questions and their answers, which explain how to use git filter-branch to do what you want to do:

For storing new big files in the future, I'd recommend using git-annex

phuclv
  • 37,963
  • 15
  • 156
  • 475
wjl
  • 7,519
  • 2
  • 32
  • 41