From: Philip Oakley <philipoakley@iee.email>
To: Bagas Sanjaya <bagasdotme@gmail.com>,
ZhangJinbao <zhang709787793@icloud.com>,
git@vger.kernel.org
Subject: Re: Some problems for git beginners
Date: Sat, 9 Oct 2021 11:32:34 +0100 [thread overview]
Message-ID: <4ef81a4e-e832-1968-3f31-5f15cd0c7320@iee.email> (raw)
In-Reply-To: <ffe633c5-151a-8646-20ef-be4f50c5f59e@gmail.com>
On 09/10/2021 10:12, Bagas Sanjaya wrote:
> On 09/10/21 14.43, ZhangJinbao wrote:
>
>> Third, when a commit event occurs, the current blob file stores the
>> full amount of data, while the previous version stores the
>> incremental data
>>
>
> When you `git commit`, Git will initially write objects related to the
> commit (blob, tree, and commit) as loose objects. Some point on the
> time, Git will repack many loose objects into one big packfile and
> write the corresponding pack index. Delta compression is applied when
> writing the packfile.
>
Git is multi-layered, and multi-faceted. So often the impression given
isn't the same as what happens internally.
All commits are full snapshots, even if git (normally) shows only the
changes for previous diffs.
But then git will, at a convenient point 'pack' all those snapshots
(fairly efficiently) so that the local git storage of the whole
repository, with full history, (typically) is no bigger than the checked
out files. The packing is part of that layering.
There are similar facet/layer effects from the Staging area ("index") /
Object store viewpoints.
The https://git-scm.com/book/en/v2/Git-Internals-Plumbing-and-Porcelain
is worth a read, along with other descriptions.
Philip
next prev parent reply other threads:[~2021-10-09 10:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-09 7:43 Some problems for git beginners ZhangJinbao
2021-10-09 9:12 ` Bagas Sanjaya
2021-10-09 10:32 ` Philip Oakley [this message]
[not found] ` <AD10E128-A820-4F84-9173-776DA90686EF@icloud.com>
2021-10-11 13:50 ` Philip Oakley
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=4ef81a4e-e832-1968-3f31-5f15cd0c7320@iee.email \
--to=philipoakley@iee.email \
--cc=bagasdotme@gmail.com \
--cc=git@vger.kernel.org \
--cc=zhang709787793@icloud.com \
/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