weso / hercules-ontology

Development of the Ontology and its Continuos Integration for the Hercules project.
https://herculescrue.github.io/ib-hercules-ontology/current/asio.html
GNU General Public License v3.0
0 stars 5 forks source link

[HOI-0140] .git object from repo is too big #140

Open alejgh opened 4 years ago

alejgh commented 4 years ago

At some point in time the shexs jar was added to this repo, with a file size of ~85MB. This is stored in the objects folder from .git, which is making the size of this repo too big. WhatsApp Image 2020-05-05 at 18 48 11

The image above shows the file that is causing this problem. That file is stored in one of the packs from '.git/objects/packs'.

We need to remove this from .git history. There are ways to do it. For example, see https://github.com/18F/C2/issues/439

alejgh commented 4 years ago

This is not a trivial problem, we made an attempt to remove this file from git history but we may damage the contents of the repository.

We have to be careful with this.

alejgh commented 4 years ago

The file is stored in pack a12c59830156b78292502a636e1004862b339996 And has the following HASH: 1d5990737f4dc8fcd13ed5a788172973dfce2f1f

To see the contents of the packs with most size: git verify-pack -v .git/objects/pack/pack-a12c59830156b78292502a636e1004862b339996.idx | sort -k 3 -n | tail -5

To see the name of the file: git rev-list --objects --all | grep [HASH] In this case, for the problematic file it would be: git rev-list --objects --all | grep 1d5990737f4dc8fcd13ed5a788172973dfce2f1f