Git - Large file deleted, but check and .pack files are still huge

I made a bunch of large images in the git repository by accident, and this slowed the situation down to a crawl. I deleted the images, but the verification still runs forever, and the .git file is 300 + MB. It seems that the .pack files are huge.

Is there any way to clear this?

thanks

+6
git
source share
1 answer

If you make such a commit, but have not made any changes to any other repository, then it is easy to get rid of it using git-rebase or the more powerful git-filter-branch . However, it looks like you have already pushed these large files upstream.

If these changes have already been distributed among many different repositories, especially those that have applied further work to them, then it can be difficult to clear without causing crashes. If the changes have not yet been widespread, you can use something like git-filter-branch to process the "main" repository (depending on what is available) to delete large files. Then replace the old master repository with your new created one and continue from now on. You may need to carefully pull the changes from this new master repository into existing repositories, or just drop them and make a new clone.

+4
source share

All Articles