1

In our CI/CD pipeline we wrongfully executed some subtree commands

git remote add -f somename someremoterepo
git subtree add --prefix ui somename develop --squash

This resulted in copies of the other repository being pulled in with every merge. Consequently our repo grew too fast.

We removed the faulty git subtree code, but our repo is now filled with floating subtree references and I have no clue on how to delete them.

enter image description here

The size of the REMOTE repository is already +1Gb where actuals source (local git) is +/- 100Mb. Any suggestions on how to tackle this?

frederickd
  • 331
  • 2
  • 6
  • Do you regulary run `git gc` in the repository? See [the answer](https://stackoverflow.com/a/2926181/7976758) about expire, repack, prune, and garbage collect. – phd Apr 24 '18 at 14:56
  • The size of Git locally is 94Mb, but on the remote it's 1Gb due to the Jenkins script constantly adding a copy of an external project via subtree command. These "additions" are floating somewhere. The image you see above is the view of "All" branches. Notice how Jenkins adds the subtree and merges it with a commit, but it just floats there. These branches aren't visible in any list except in the overview. I've executing git gc and other recommendations like that and the size locally isn't any issue... it's the remote part that I can't fix. – frederickd Apr 25 '18 at 15:22

0 Answers0