0

My current old repo has many large files which impacts the code sharing efficiency and I'd like to maintain a cleaned version of this old repo by deleting those large files. Meanwhile, I still want to keep the files in the old repo as backup.

So I go through this way :

  1. git branch new
  2. git rm the large files
  3. git push branch new to new remote new-remote origin

However, I checked the counting objects and writing objects before and after the deletion in the push operation, and found that the counting objects did not change. So it seems the new-remote origin will still has similar repo size. Why would the repo size not changed and what's a better strategy to do this ?

John Kugelman
  • 330,190
  • 66
  • 504
  • 555
exteral
  • 931
  • 2
  • 11
  • 31
  • 1
    Removing files from future commits does not remove them from past commits, nor the repo itself. Also, you don't seem to be committing after running `git rm`? – evolutionxbox Jan 16 '22 at 00:54

0 Answers0