[kwlug-disc] How GIT stores stuff.

Bob B bob at softscape.ca
Tue May 3 15:53:26 EDT 2022


Chris,

Cool! Good to know.

I ran this on a copy of my password-store tree (all gpg encrypted files) and it reduced it by about 1M (~2%)

Any idea how to interpret what it actually did from this:

tower:.password-store bob$ git gc
Counting objects: 4031, done.
Delta compression using up to 24 threads.
Compressing objects: 100% (2261/2261), done.
Writing objects: 100% (4031/4031), done.
Total 4031 (delta 1839), reused 3683 (delta 1703)

tower:.password-store bob$ du -sh . ~/.password-store/
 41M	.
 42M	/Users/bob/.password-store/


So many questions! Do you have a good learning resource for git or is it just a matter of using it more and learning nuances like this as you come across them?

BB


> -----Original Message-----
> From: kwlug-disc <kwlug-disc-bounces at kwlug.org> On Behalf Of Chris
> Frey
> Sent: May 3, 2022 2:24 PM
> To: KWLUG discussion <kwlug-disc at kwlug.org>
> Subject: Re: [kwlug-disc] How GIT stores stuff.
> 
> On Tue, May 03, 2022 at 10:36:23AM -0400, Bob B wrote:
> > It has some references to deeper information that look enticing, but
> in
> > summary I think it confirms what I said in that GIT stores complete
> files,
> > not deltas. At least not deltas as 'diffs' of text files.
> 
> This is correct.  At least until you run 'git gc' which then turns
> those individual files into packs, which do store things in diff-like
> ways.
> 
> When you do a fresh clone from a remote repository, you will download
> the pack,
> which you can see if you look inside the .git directory.  If you start
> your own git repo, you will see many individual files in the objects
> subdirectory until you run git-gc and git decides it is time to
> pack things up for optimization purposes.
> 
> - Chris
> 
> 
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> https://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org







More information about the kwlug-disc mailing list