RSS Amplifier

*☆。゚juni's caramel tech café・゚*☆ · Dec 23, 2024

PACK files in .git - a rabbit hole

0
Sign in to vote or save

This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.

- so, how did we get here? :see_no_evil: 
 git stores all historical changes to a repo in a PACK file inside the hidden .git folder. This allows restoration of previous repo states in the future. 
 However, if you upload files like binaries, photos or videos, this file gets VERY large, even if you delete them in a future commit. 
 - enter: git-filter-repo Luckily a tool exists called…

- so, how did we get here? :see_no_evil:


git stores all historical changes to a repo in a PACK file inside the hidden .git folder. This allows restoration of previous repo states in the future.

However, if you upload files like binaries, photos or videos, this file gets VERY large, even if you delete them in a future commit.

- enter: git-filter-repo

Luckily a tool exists called git-filter-repo that you can download and use (python script) to analyse your PACK file, and filter out any unwanted bits (e.g. file extensions, paths, etc.). This can dramatically reduce the size of the PACK file.

Read on /posts/6/pack-files-git/

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.