2

I'm trying to delete some huge, 100MB binary file from my repository. I followed these instructions, detailed here:

http://stevelorek.com/how-to-shrink-a-git-repository.html

The instructions are based on the command:

git filter-branch --tag-name-filter cat --index-filter 'git rm -r --cached --ignore-unmatch filename' --prune-empty -f -- --all 

When I ran the script again, after allegedly removing the file, it was indeed gone. But then, when I cloned the repository again, after pushing the changes, the file was back again.

How can I apply the changes after deleting the big file?

git push origin --force --all

simply won't cut it.

EDIT: The file has been deleted 2 years ago, so there's nothing to commit/delete. I tried creating a dummy commit with some file addition, still no go.

Tsury
  • 729
  • 1
  • 9
  • 24

2 Answers2

0

I ended up converting the local, clean repository into a bare repository, mentioned here and replacing the old bare repository with it.

Still no idea as to why I couldn't apply the changes to the central repository.

Community
  • 1
  • 1
Tsury
  • 729
  • 1
  • 9
  • 24
0

You can use BGF to do such cleanups.

Simply pushing the new cleaned commits, will not clean the other repository as long the old commits are still reachable.

michas
  • 25,361
  • 15
  • 76
  • 121