From: Erik Cervin Edin <erik@cervined.in>
To: fawaz ahmed0 <fawazahmed0@hotmail.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Reducing Git Repository size - git-filter-repo doesn't help
Date: Mon, 9 Jan 2023 11:22:13 +0100 [thread overview]
Message-ID: <CA+JQ7M--TeqxH3nj95sAvGTPz9FbHkS2eYfe763w05fUZX0XCA@mail.gmail.com> (raw)
In-Reply-To: <PH7PR12MB779560B6C003FEE76E4F2471F1FE9@PH7PR12MB7795.namprd12.prod.outlook.com>
On Mon, Jan 9, 2023 at 3:24 AM fawaz ahmed0 <fawazahmed0@hotmail.com> 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.
next prev parent reply other threads:[~2023-01-09 10:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 2:22 Reducing Git Repository size - git-filter-repo doesn't help fawaz ahmed0
2023-01-09 2:36 ` rsbecker
2023-01-09 3:29 ` fawaz ahmed0
2023-01-09 10:22 ` Erik Cervin Edin [this message]
2023-01-10 2:42 ` Elijah Newren
2023-01-10 8:18 ` fawaz ahmed0
2023-01-11 2:18 ` Elijah Newren
2023-01-11 8:41 ` Elijah Newren
2023-01-11 20:08 ` fawaz ahmed0
2023-01-12 1:54 ` fawaz ahmed0
2023-01-12 2:01 ` Elijah Newren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+JQ7M--TeqxH3nj95sAvGTPz9FbHkS2eYfe763w05fUZX0XCA@mail.gmail.com \
--to=erik@cervined.in \
--cc=fawazahmed0@hotmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).