Re: Reducing Git Repository size - git-filter-repo doesn't help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 9, 2023 at 3:24 AM fawaz ahmed0 <fawazahmed0@xxxxxxxxxxx> wrote:
> I have this huge repo: https://github.com/fawazahmed0/currency-api#readme  and I am trying to reduce its size.
>
> I have run filter-repo script on this repo (  https://github.com/fawazahmed0/currency-api/blob/1/.github/workflows/cleanup-repo.yml )

Can you elaborate exactly how you're trying to reduce the repository?
Looking at the script it seems you're removing /latest? And/or folders
corresponding to certain years?

> The commits were reduced from 1k to 600 , but the space used is still same. (i.e size-pack: 6.47 GiB , https://github.com/fawazahmed95/currency-api/actions/runs/3865919157/jobs/6589710845#step:5:1498 )

The number of commits is actually irrelevant, what matters is really
only how much of the tree was pruned. And only if what was pruned
wasn't duplicated.

Say you commit
  2018/big.json
  2019/same-identical-big.json
and then delete 2018, the size of the repository in its packed state
will be virtually identical.

You can analyze which files and directories are occupying the most
space by running
  git filter-repo --analyze
and checking the output file. (It's somewhere like
.git/filter-repo/analysis I don't remember exactly)

However, it seems that you're using git in a highly unconventional
manner and I'd say it's probably worthwhile to consider if it's even
the appropriate tool for the task at hand.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux