0

I want to preface this question by saying that I'm aware of the fact that rewriting history in Git is usually a bad practice, but I'm facing a problem to which I cannot seem to find another type of solution.

We have noticed that our repo (which is a porting of a very old SVN project) has a stunning size of 2.4 GB as reported by GitLab, even though it's below 80 MB when checked out. This is creating some performance problems in our pipeline.

It seems like the cause of this anomalous size is a old pre-porting commit in which -I suppose accidentally- 3.7 GB worth of zip files where saved to the repo, and deleted immediately after.

A - ... - B (very large commit) - C (revert) - ... - D (Basically every other branch starts from here)

Since this commit is 5 years old and every active branch stems from there, I need to find a very clean solution to avoid any kind of problems to all the people currently working on the project.

Is there a reasonably safe way to do this or is it better to leave as it is?

  • If you want to remove the file from history you are talking about _rewriting_ history. – eftshift0 Feb 10 '21 at 16:13
  • Esp. this answer https://stackoverflow.com/a/61602985/7976758 – phd Feb 10 '21 at 16:25
  • https://htmlpreview.github.io/?https://github.com/newren/git-filter-repo/blob/docs/html/git-filter-repo.html#EXAMPLES – phd Feb 10 '21 at 16:27

0 Answers0