<s>
Git	B-Application
(	O
)	O
is	O
a	O
distributed	B-Protocol
version	I-Protocol
control	I-Protocol
system	I-Protocol
that	O
tracks	O
changes	O
in	O
any	O
set	O
of	O
computer	B-Operating_System
files	I-Operating_System
,	O
usually	O
used	O
for	O
coordinating	O
work	O
among	O
programmers	B-Application
collaboratively	O
developing	O
source	O
code	O
during	O
software	O
development	O
.	O
</s>
<s>
Git	B-Application
was	O
originally	O
authored	O
by	O
Linus	O
Torvalds	O
in	O
2005	O
for	O
development	O
of	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
,	O
with	O
other	O
kernel	B-Operating_System
developers	B-Application
contributing	O
to	O
its	O
initial	O
development	O
.	O
</s>
<s>
Since	O
2005	O
,	O
Junio	B-Application
Hamano	I-Application
has	O
been	O
the	O
core	O
maintainer	O
.	O
</s>
<s>
As	O
with	O
most	O
other	O
distributed	B-Protocol
version	I-Protocol
control	I-Protocol
systems	I-Protocol
,	O
and	O
unlike	O
most	O
client	B-Operating_System
–	I-Operating_System
server	I-Operating_System
systems	O
,	O
every	O
Git	B-Application
directory	B-Application
on	O
every	O
computer	B-Protocol
is	O
a	O
full-fledged	O
repository	B-General_Concept
with	O
complete	O
history	O
and	O
full	O
version-tracking	O
abilities	O
,	O
independent	O
of	O
network	O
access	O
or	O
a	O
central	O
server	O
.	O
</s>
<s>
Git	B-Application
is	O
free	B-License
and	I-License
open-source	I-License
software	I-License
distributed	O
under	O
the	O
GPL-2.0-only	B-License
license	O
.	O
</s>
<s>
Git	B-Application
development	O
began	O
in	O
April	O
2005	O
,	O
after	O
many	O
developers	B-Application
of	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
gave	O
up	O
access	O
to	O
BitKeeper	B-Protocol
,	O
a	O
proprietary	O
source-control	B-Architecture
management	I-Architecture
(	O
SCM	O
)	O
system	O
that	O
they	O
had	O
been	O
using	O
to	O
maintain	O
the	O
project	O
since	O
2002	O
.	O
</s>
<s>
The	O
copyright	O
holder	O
of	O
BitKeeper	B-Protocol
,	O
Larry	O
McVoy	O
,	O
had	O
withdrawn	O
free	O
use	O
of	O
the	O
product	O
after	O
claiming	O
that	O
Andrew	O
Tridgell	O
had	O
created	O
SourcePuller	B-Language
by	O
reverse	O
engineering	O
the	O
BitKeeper	B-Protocol
protocols	O
.	O
</s>
<s>
The	O
same	O
incident	O
also	O
spurred	O
the	O
creation	O
of	O
another	O
version-control	B-Architecture
system	O
,	O
Mercurial	B-Protocol
.	O
</s>
<s>
Linus	O
Torvalds	O
wanted	O
a	O
distributed	O
system	O
that	O
he	O
could	O
use	O
like	O
BitKeeper	B-Protocol
,	O
but	O
none	O
of	O
the	O
available	O
free	O
systems	O
met	O
his	O
needs	O
.	O
</s>
<s>
Torvalds	O
cited	O
an	O
example	O
of	O
a	O
source-control	B-Architecture
management	I-Architecture
system	O
needing	O
30	O
seconds	O
to	O
apply	O
a	O
patch	O
and	O
update	O
all	O
associated	O
metadata	O
,	O
and	O
noted	O
that	O
this	O
would	O
not	O
scale	O
to	O
the	O
needs	O
of	O
Linux	B-Operating_System
kernel	I-Operating_System
development	O
,	O
where	O
synchronizing	O
with	O
fellow	O
maintainers	O
could	O
require	O
250	O
such	O
actions	O
at	O
once	O
.	O
</s>
<s>
Take	O
Concurrent	B-Application
Versions	I-Application
System	I-Application
(	O
CVS	B-Application
)	O
as	O
an	O
example	O
of	O
what	O
not	O
to	O
do	O
;	O
if	O
in	O
doubt	O
,	O
make	O
the	O
exact	O
opposite	O
decision	O
.	O
</s>
<s>
Support	O
a	O
distributed	O
,	O
BitKeeper-like	O
workflow	O
.	O
</s>
<s>
These	O
criteria	O
eliminated	O
every	O
version-control	B-Architecture
system	O
in	O
use	O
at	O
the	O
time	O
,	O
so	O
immediately	O
after	O
the	O
2.6.12-rc2	O
Linux	B-Operating_System
kernel	I-Operating_System
development	O
release	O
,	O
Torvalds	O
set	O
out	O
to	O
write	O
his	O
own	O
.	O
</s>
<s>
The	O
development	O
of	O
Git	B-Application
began	O
on	O
3	O
April	O
2005	O
.	O
</s>
<s>
Torvalds	O
achieved	O
his	O
performance	O
goals	O
;	O
on	O
29	O
April	O
,	O
the	O
nascent	O
Git	B-Application
was	O
benchmarked	O
recording	O
patches	O
to	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
tree	O
at	O
the	O
rate	O
of	O
6.7	O
patches	O
per	O
second	O
.	O
</s>
<s>
On	O
16	O
June	O
,	O
Git	B-Application
managed	O
the	O
kernel	B-Operating_System
2.6.12	O
release	O
.	O
</s>
<s>
Torvalds	O
turned	O
over	O
maintenance	O
on	O
26	O
July	O
2005	O
to	O
Junio	B-Application
Hamano	I-Application
,	O
a	O
major	O
contributor	O
to	O
the	O
project	O
.	O
</s>
<s>
Torvalds	O
sarcastically	O
quipped	O
about	O
the	O
name	O
git	B-Application
(	O
which	O
means	O
"	O
unpleasant	O
person	O
"	O
in	O
British	O
English	O
slang	O
)	O
:	O
"	O
I	O
'm	O
an	O
egotistical	O
bastard	O
,	O
and	O
I	O
name	O
all	O
my	O
projects	O
after	O
myself	O
.	O
</s>
<s>
First	O
'	O
Linux	B-Application
 '	O
,	O
now	O
'	O
git	B-Application
 '	O
.	O
"	O
</s>
<s>
The	O
man	B-Protocol
page	I-Protocol
describes	O
Git	B-Application
as	O
"	O
the	B-Application
stupid	I-Application
content	I-Application
tracker	I-Application
"	O
.	O
</s>
<s>
The	O
read-me	O
file	B-Operating_System
of	O
the	O
source	O
code	O
elaborates	O
further	O
:	O
</s>
<s>
The	O
source	O
code	O
for	O
Git	B-Application
refers	O
to	O
the	O
program	O
as	O
,	O
"	O
the	O
information	O
manager	O
from	O
hell	O
"	O
.	O
</s>
<s>
List	O
of	O
Git	B-Application
releases	O
:	O
</s>
<s>
The	O
command	O
line	O
completion	O
script	O
(	O
in	O
contrib/	O
)	O
learned	O
that	O
"	O
git	B-Application
stash	O
show	O
"	O
takes	O
the	O
options	O
"	O
git	B-Application
diff	B-Application
"	O
takes	O
.	O
</s>
<s>
git	B-Application
pull	O
warning	O
to	O
specify	O
rebase	O
or	O
merge	O
2021-06-06	O
2.32.5	O
2023-01-17	O
2021-08-16	O
2.33.6	O
2023-01-17	O
2021-11-15	O
2.34.6	O
2023-01-17	O
2022-01-25	O
2.35.6	O
2023-01-17	O
2022-04-18	O
2.36.4	O
2023-01-17	O
2022-06-27	O
2.37.52023-01-17	O
2022-10-02	O
2.38.32023-01-17	O
2022-12-12	O
2.39.12023-01-17	O
2023-03-14	O
2.40.02023-03-14	O
Sources	O
:	O
</s>
<s>
Git	B-Application
's	O
design	O
was	O
inspired	O
by	O
BitKeeper	B-Protocol
and	O
Monotone	B-Application
.	O
</s>
<s>
Git	B-Application
was	O
originally	O
designed	O
as	O
a	O
low-level	O
version-control	B-Architecture
system	O
engine	O
,	O
on	O
top	O
of	O
which	O
others	O
could	O
write	O
front	O
ends	O
,	O
such	O
as	O
Cogito	B-Application
or	O
StGIT	O
.	O
</s>
<s>
The	O
core	O
Git	B-Application
project	O
has	O
since	O
become	O
a	O
complete	O
version-control	B-Architecture
system	O
that	O
is	O
usable	O
directly	O
.	O
</s>
<s>
While	O
strongly	O
influenced	O
by	O
BitKeeper	B-Protocol
,	O
Torvalds	O
deliberately	O
avoided	O
conventional	O
approaches	O
,	O
leading	O
to	O
a	O
unique	O
design	O
.	O
</s>
<s>
Git	B-Application
's	O
design	O
is	O
a	O
synthesis	O
of	O
Torvalds	O
's	O
experience	O
with	O
Linux	B-Application
in	O
maintaining	O
a	O
large	O
distributed	O
development	O
project	O
,	O
along	O
with	O
his	O
intimate	O
knowledge	O
of	O
file-system	O
performance	O
gained	O
from	O
the	O
same	O
project	O
and	O
the	O
urgent	O
need	O
to	O
produce	O
a	O
working	O
system	O
in	O
short	O
order	O
.	O
</s>
<s>
Strong	O
support	O
for	O
non-linear	O
development	O
Git	B-Application
supports	O
rapid	O
branching	O
and	O
merging	O
,	O
and	O
includes	O
specific	O
tools	O
for	O
visualizing	O
and	O
navigating	O
a	O
non-linear	O
development	O
history	O
.	O
</s>
<s>
In	O
Git	B-Application
,	O
a	O
core	O
assumption	O
is	O
that	O
a	O
change	O
will	O
be	O
merged	O
more	O
often	O
than	O
it	O
is	O
written	O
,	O
as	O
it	O
is	O
passed	O
around	O
to	O
various	O
reviewers	O
.	O
</s>
<s>
In	O
Git	B-Application
,	O
branches	O
are	O
very	O
lightweight	O
:	O
a	O
branch	O
is	O
only	O
a	O
reference	O
to	O
one	O
commit	O
.	O
</s>
<s>
Distributed	O
development	O
Like	O
Darcs	B-Protocol
,	O
BitKeeper	B-Protocol
,	O
Mercurial	B-Protocol
,	O
Bazaar	B-Protocol
,	O
and	O
Monotone	B-Application
,	O
Git	B-Application
gives	O
each	O
developer	B-Application
a	O
local	O
copy	O
of	O
the	O
full	O
development	O
history	O
,	O
and	O
changes	O
are	O
copied	O
from	O
one	O
such	O
repository	B-General_Concept
to	O
another	O
.	O
</s>
<s>
Compatibility	O
with	O
existing	O
systems	O
and	O
protocols	O
Repositories	B-General_Concept
can	O
be	O
published	O
via	O
Hypertext	B-Protocol
Transfer	I-Protocol
Protocol	I-Protocol
Secure	I-Protocol
(	O
HTTPS	B-Protocol
)	O
,	O
Hypertext	B-Protocol
Transfer	I-Protocol
Protocol	I-Protocol
(	O
HTTP	B-Protocol
)	O
,	O
File	B-Protocol
Transfer	I-Protocol
Protocol	I-Protocol
(	O
FTP	O
)	O
,	O
or	O
a	O
Git	B-Application
protocol	O
over	O
either	O
a	O
plain	O
socket	O
or	O
Secure	B-Protocol
Shell	I-Protocol
(	O
ssh	B-Protocol
)	O
.	O
</s>
<s>
Git	B-Application
also	O
has	O
a	O
CVS	B-Application
server	O
emulation	O
,	O
which	O
enables	O
the	O
use	O
of	O
existing	O
CVS	B-Application
clients	O
and	O
IDE	O
plugins	O
to	O
access	O
Git	B-Application
repositories	B-General_Concept
.	O
</s>
<s>
Subversion	B-Application
repositories	B-General_Concept
can	O
be	O
used	O
directly	O
with	O
git-svn	O
.	O
</s>
<s>
Efficient	O
handling	O
of	O
large	O
projects	O
Torvalds	O
has	O
described	O
Git	B-Application
as	O
being	O
very	O
fast	O
and	O
scalable	O
,	O
and	O
performance	O
tests	O
done	O
by	O
Mozilla	O
showed	O
that	O
it	O
was	O
an	O
order	O
of	O
magnitude	O
faster	O
diffing	O
large	O
repositories	B-General_Concept
than	O
Mercurial	B-Protocol
and	O
GNU	B-Protocol
Bazaar	I-Protocol
;	O
fetching	O
version	O
history	O
from	O
a	O
locally	O
stored	O
repository	B-General_Concept
can	O
be	O
one	O
hundred	O
times	O
faster	O
than	O
fetching	O
it	O
from	O
the	O
remote	O
server	O
.	O
</s>
<s>
Cryptographic	O
authentication	O
of	O
history	O
The	O
Git	B-Application
history	O
is	O
stored	O
in	O
such	O
a	O
way	O
that	O
the	O
ID	O
of	O
a	O
particular	O
version	O
(	O
a	O
commit	O
in	O
Git	B-Application
terms	O
)	O
depends	O
upon	O
the	O
complete	O
development	O
history	O
leading	O
up	O
to	O
that	O
commit	O
.	O
</s>
<s>
The	O
structure	O
is	O
similar	O
to	O
a	O
Merkle	B-Algorithm
tree	I-Algorithm
,	O
but	O
with	O
added	O
data	O
at	O
the	O
nodes	O
and	O
leaves	O
.	O
</s>
<s>
(	O
Mercurial	B-Protocol
and	O
Monotone	B-Application
also	O
have	O
this	O
property	O
.	O
)	O
</s>
<s>
Toolkit-based	O
design	O
Git	B-Application
was	O
designed	O
as	O
a	O
set	O
of	O
programs	O
written	O
in	O
C	B-Language
and	O
several	O
shell	B-Language
scripts	I-Language
that	O
provide	O
wrappers	O
around	O
those	O
programs	O
.	O
</s>
<s>
Although	O
most	O
of	O
those	O
scripts	O
have	O
since	O
been	O
rewritten	O
in	O
C	B-Language
for	O
speed	O
and	O
portability	O
,	O
the	O
design	O
remains	O
,	O
and	O
it	O
is	O
easy	O
to	O
chain	O
the	O
components	O
together	O
.	O
</s>
<s>
Pluggable	O
merge	O
strategies	O
As	O
part	O
of	O
its	O
toolkit	O
design	O
,	O
Git	B-Application
has	O
a	O
well-defined	O
model	O
of	O
an	O
incomplete	O
merge	O
,	O
and	O
it	O
has	O
multiple	O
algorithms	O
for	O
completing	O
it	O
,	O
culminating	O
in	O
telling	O
the	O
user	O
that	O
it	O
is	O
unable	O
to	O
complete	O
the	O
merge	O
automatically	O
and	O
that	O
manual	O
editing	O
is	O
needed	O
.	O
</s>
<s>
Garbage	B-General_Concept
accumulates	O
until	O
collected	O
Aborting	O
operations	O
or	O
backing	O
out	O
changes	O
will	O
leave	O
useless	O
dangling	O
objects	O
in	O
the	O
database	O
.	O
</s>
<s>
Git	B-Application
will	O
automatically	O
perform	O
garbage	B-General_Concept
collection	I-General_Concept
when	O
enough	O
loose	O
objects	O
have	O
been	O
created	O
in	O
the	O
repository	B-General_Concept
.	O
</s>
<s>
Garbage	B-General_Concept
collection	I-General_Concept
can	O
be	O
called	O
explicitly	O
using	O
git	B-Application
gc	O
.	O
</s>
<s>
Periodic	O
explicit	O
object	O
packing	O
Git	B-Application
stores	O
each	O
newly	O
created	O
object	O
as	O
a	O
separate	O
file	B-Operating_System
.	O
</s>
<s>
This	O
is	O
solved	O
by	O
the	O
use	O
of	O
packs	O
that	O
store	O
a	O
large	O
number	O
of	O
objects	O
delta-compressed	B-Algorithm
among	O
themselves	O
in	O
one	O
file	B-Operating_System
(	O
or	O
network	O
byte	O
stream	O
)	O
called	O
a	O
packfile	O
.	O
</s>
<s>
Packs	O
are	O
compressed	O
using	O
the	O
heuristic	B-Algorithm
that	O
files	O
with	O
the	O
same	O
name	O
are	O
probably	O
similar	O
,	O
without	O
depending	O
on	O
this	O
for	O
correctness	O
.	O
</s>
<s>
A	O
corresponding	O
index	O
file	B-Operating_System
is	O
created	O
for	O
each	O
packfile	O
,	O
telling	O
the	O
offset	O
of	O
each	O
object	O
in	O
the	O
packfile	O
.	O
</s>
<s>
The	O
process	O
of	O
packing	O
the	O
repository	B-General_Concept
can	O
be	O
very	O
computationally	O
costly	O
.	O
</s>
<s>
By	O
allowing	O
objects	O
to	O
exist	O
in	O
the	O
repository	B-General_Concept
in	O
a	O
loose	O
but	O
quickly	O
generated	O
format	O
,	O
Git	B-Application
allows	O
the	O
costly	O
pack	O
operation	O
to	O
be	O
deferred	O
until	O
later	O
,	O
when	O
time	O
matters	O
less	O
,	O
e.g.	O
,	O
the	O
end	O
of	O
a	O
workday	O
.	O
</s>
<s>
Git	B-Application
does	O
periodic	O
repacking	O
automatically	O
,	O
but	O
manual	O
repacking	O
is	O
also	O
possible	O
with	O
the	O
git	B-Application
gc	O
command	O
.	O
</s>
<s>
For	O
data	O
integrity	O
,	O
both	O
the	O
packfile	O
and	O
its	O
index	O
have	O
an	O
SHA-1	B-Algorithm
checksum	O
inside	O
,	O
and	O
the	O
file	B-Operating_System
name	O
of	O
the	O
packfile	O
also	O
contains	O
an	O
SHA-1	B-Algorithm
checksum	O
.	O
</s>
<s>
To	O
check	O
the	O
integrity	O
of	O
a	O
repository	B-General_Concept
,	O
run	O
the	O
git	B-Application
fsck	O
command	O
.	O
</s>
<s>
Another	O
property	O
of	O
Git	B-Application
is	O
that	O
it	O
snapshots	O
directory	B-Application
trees	I-Application
of	O
files	O
.	O
</s>
<s>
The	O
earliest	O
systems	O
for	O
tracking	O
versions	O
of	O
source	O
code	O
,	O
Source	B-Device
Code	I-Device
Control	I-Device
System	I-Device
(	O
SCCS	O
)	O
and	O
Revision	B-Architecture
Control	I-Architecture
System	I-Architecture
(	O
RCS	O
)	O
,	O
worked	O
on	O
individual	O
files	O
and	O
emphasized	O
the	O
space	O
savings	O
to	O
be	O
gained	O
from	O
interleaved	B-Protocol
deltas	I-Protocol
(	O
SCCS	O
)	O
or	O
delta	B-Algorithm
encoding	I-Algorithm
(	O
RCS	O
)	O
the	O
(	O
mostly	O
similar	O
)	O
versions	O
.	O
</s>
<s>
Later	O
revision-control	O
systems	O
maintained	O
this	O
notion	O
of	O
a	O
file	B-Operating_System
having	O
an	O
identity	O
across	O
multiple	O
revisions	O
of	O
a	O
project	O
.	O
</s>
<s>
Consequently	O
,	O
Git	B-Application
does	O
not	O
explicitly	O
record	O
file	B-Operating_System
revision	O
relationships	O
at	O
any	O
level	O
below	O
the	O
source-code	O
tree	O
.	O
</s>
<s>
It	O
is	O
slightly	O
more	O
costly	O
to	O
examine	O
the	O
change	O
history	O
of	O
one	O
file	B-Operating_System
than	O
the	O
whole	O
project	O
.	O
</s>
<s>
To	O
obtain	O
a	O
history	O
of	O
changes	O
affecting	O
a	O
given	O
file	B-Operating_System
,	O
Git	B-Application
must	O
walk	O
the	O
global	O
history	O
and	O
then	O
determine	O
whether	O
each	O
change	O
modified	O
that	O
file	B-Operating_System
.	O
</s>
<s>
This	O
method	O
of	O
examining	O
history	O
does	O
,	O
however	O
,	O
let	O
Git	B-Application
produce	O
with	O
equal	O
efficiency	O
a	O
single	O
history	O
showing	O
the	O
changes	O
to	O
an	O
arbitrary	O
set	O
of	O
files	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
subdirectory	B-Application
of	O
the	O
source	O
tree	O
plus	O
an	O
associated	O
global	O
header	O
file	B-Operating_System
is	O
a	O
very	O
common	O
case	O
.	O
</s>
<s>
A	O
common	O
complaint	O
with	O
CVS	B-Application
is	O
that	O
it	O
uses	O
the	O
name	O
of	O
a	O
file	B-Operating_System
to	O
identify	O
its	O
revision	O
history	O
,	O
so	O
moving	O
or	O
renaming	O
a	O
file	B-Operating_System
is	O
not	O
possible	O
without	O
either	O
interrupting	O
its	O
history	O
or	O
renaming	O
the	O
history	O
and	O
thereby	O
making	O
the	O
history	O
inaccurate	O
.	O
</s>
<s>
Most	O
post-CVS	O
revision-control	O
systems	O
solve	O
this	O
by	O
giving	O
a	O
file	B-Operating_System
a	O
unique	O
long-lived	O
name	O
(	O
analogous	O
to	O
an	O
inode	B-Application
number	I-Application
)	O
that	O
survives	O
renaming	O
.	O
</s>
<s>
Git	B-Application
does	O
not	O
record	O
such	O
an	O
identifier	O
,	O
and	O
this	O
is	O
claimed	O
as	O
an	O
advantage	O
.	O
</s>
<s>
Git	B-Application
addresses	O
the	O
issue	O
by	O
detecting	O
renames	O
while	O
browsing	O
the	O
history	O
of	O
snapshots	O
rather	O
than	O
recording	O
it	O
when	O
making	O
the	O
snapshot	O
.	O
</s>
<s>
(	O
Briefly	O
,	O
given	O
a	O
file	B-Operating_System
in	O
revision	O
N	O
,	O
a	O
file	B-Operating_System
of	O
the	O
same	O
name	O
in	O
revision	O
N−1	O
is	O
its	O
default	O
ancestor	O
.	O
</s>
<s>
However	O
,	O
when	O
there	O
is	O
no	O
like-named	O
file	B-Operating_System
in	O
revision	O
N−1	O
,	O
Git	B-Application
searches	O
for	O
a	O
file	B-Operating_System
that	O
existed	O
only	O
in	O
revision	O
N−1	O
and	O
is	O
very	O
similar	O
to	O
the	O
new	O
file	B-Operating_System
.	O
)	O
</s>
<s>
However	O
,	O
it	O
does	O
require	O
more	O
CPU-intensive	O
work	O
every	O
time	O
the	O
history	O
is	O
reviewed	O
,	O
and	O
several	O
options	O
to	O
adjust	O
the	O
heuristics	B-Algorithm
are	O
available	O
.	O
</s>
<s>
This	O
mechanism	O
does	O
not	O
always	O
work	O
;	O
sometimes	O
a	O
file	B-Operating_System
that	O
is	O
renamed	O
with	O
changes	O
in	O
the	O
same	O
commit	O
is	O
read	O
as	O
a	O
deletion	O
of	O
the	O
old	O
file	B-Operating_System
and	O
the	O
creation	O
of	O
a	O
new	O
file	B-Operating_System
.	O
</s>
<s>
Developers	B-Application
can	O
work	O
around	O
this	O
limitation	O
by	O
committing	O
the	O
rename	O
and	O
the	O
changes	O
separately	O
.	O
</s>
<s>
Git	B-Application
implements	O
several	O
merging	O
strategies	O
;	O
a	O
non-default	O
strategy	O
can	O
be	O
selected	O
at	O
merge	O
time	O
:	O
</s>
<s>
Git	B-Application
's	O
primitives	O
are	O
not	O
inherently	O
a	O
source-code	B-Architecture
management	I-Architecture
system	O
.	O
</s>
<s>
From	O
this	O
initial	O
design	O
approach	O
,	O
Git	B-Application
has	O
developed	O
the	O
full	O
set	O
of	O
features	O
expected	O
of	O
a	O
traditional	O
SCM	O
,	O
with	O
features	O
mostly	O
being	O
created	O
as	O
needed	O
,	O
then	O
refined	O
and	O
extended	O
over	O
time	O
.	O
</s>
<s>
Git	B-Application
has	O
two	O
data	B-General_Concept
structures	I-General_Concept
:	O
a	O
mutable	O
index	O
(	O
also	O
called	O
stage	O
or	O
cache	O
)	O
that	O
caches	O
information	O
about	O
the	O
working	O
directory	B-Application
and	O
the	O
next	O
revision	O
to	O
be	O
committed	O
;	O
and	O
an	O
immutable	O
,	O
append-only	O
object	O
database	O
.	O
</s>
<s>
A	O
blob	B-General_Concept
(	O
binary	B-General_Concept
large	I-General_Concept
object	I-General_Concept
)	O
is	O
the	O
content	O
of	O
a	O
file	B-Operating_System
.	O
</s>
<s>
Blobs	B-General_Concept
have	O
no	O
proper	O
file	B-Operating_System
name	O
,	O
time	O
stamps	O
,	O
or	O
other	O
metadata	O
(	O
A	O
blob	B-General_Concept
's	O
name	O
internally	O
is	O
a	O
hash	B-Algorithm
of	O
its	O
content	O
.	O
)	O
.	O
</s>
<s>
In	O
git	B-Application
each	O
blob	B-General_Concept
is	O
a	O
version	O
of	O
a	O
file	B-Operating_System
,	O
it	O
holds	O
the	O
file	B-Operating_System
's	O
data	O
.	O
</s>
<s>
A	O
tree	O
object	O
is	O
the	O
equivalent	O
of	O
a	O
directory	B-Application
.	O
</s>
<s>
It	O
contains	O
a	O
list	O
of	O
file	B-Operating_System
names	O
,	O
each	O
with	O
some	O
type	O
bits	O
and	O
a	O
reference	O
to	O
a	O
blob	B-General_Concept
or	O
tree	O
object	O
that	O
is	O
that	O
file	B-Operating_System
,	O
symbolic	O
link	O
,	O
or	O
directory	B-Application
's	O
contents	O
.	O
</s>
<s>
(	O
In	O
whole	O
,	O
this	O
comprises	O
a	O
Merkle	B-Algorithm
tree	I-Algorithm
,	O
meaning	O
that	O
only	O
a	O
single	O
hash	B-Algorithm
for	O
the	O
root	O
tree	O
is	O
sufficient	O
and	O
actually	O
used	O
in	O
commits	O
to	O
precisely	O
pinpoint	O
to	O
the	O
exact	O
state	O
of	O
whole	O
tree	O
structures	O
of	O
any	O
number	O
of	O
sub-directories	O
and	O
files	O
.	O
)	O
</s>
<s>
It	O
contains	O
the	O
name	O
of	O
a	O
tree	O
object	O
(	O
of	O
the	O
top-level	O
source	O
directory	B-Application
)	O
,	O
a	O
timestamp	O
,	O
a	O
log	O
message	O
,	O
and	O
the	O
names	O
of	O
zero	O
or	O
more	O
parent	O
commit	O
objects	O
.	O
</s>
<s>
Most	O
commonly	O
,	O
it	O
is	O
used	O
to	O
store	O
a	O
digital	O
signature	O
of	O
a	O
commit	O
object	O
corresponding	O
to	O
a	O
particular	O
release	O
of	O
the	O
data	O
being	O
tracked	O
by	O
Git	B-Application
.	O
</s>
<s>
A	O
packfile	O
object	O
collects	O
various	O
other	O
objects	O
into	O
a	O
zlib-compressed	O
bundle	O
for	O
compactness	O
and	O
ease	O
of	O
transport	O
over	O
network	O
protocols	O
.	O
</s>
<s>
Each	O
object	O
is	O
identified	O
by	O
a	O
SHA-1	B-Algorithm
hash	I-Algorithm
of	O
its	O
contents	O
.	O
</s>
<s>
Git	B-Application
computes	O
the	O
hash	B-Algorithm
and	O
uses	O
this	O
value	O
for	O
the	O
object	O
's	O
name	O
.	O
</s>
<s>
The	O
object	O
is	O
put	O
into	O
a	O
directory	B-Application
matching	O
the	O
first	O
two	O
characters	O
of	O
its	O
hash	B-Algorithm
.	O
</s>
<s>
The	O
rest	O
of	O
the	O
hash	B-Algorithm
is	O
used	O
as	O
the	O
file	B-Operating_System
name	O
for	O
that	O
object	O
.	O
</s>
<s>
Git	B-Application
stores	O
each	O
revision	O
of	O
a	O
file	B-Operating_System
as	O
a	O
unique	O
blob	B-General_Concept
.	O
</s>
<s>
The	O
relationships	O
between	O
the	O
blobs	B-General_Concept
can	O
be	O
found	O
through	O
examining	O
the	O
tree	O
and	O
commit	O
objects	O
.	O
</s>
<s>
Newly	O
added	O
objects	O
are	O
stored	O
in	O
their	O
entirety	O
using	O
zlib	B-Language
compression	O
.	O
</s>
<s>
This	O
can	O
consume	O
a	O
large	O
amount	O
of	O
disk	O
space	O
quickly	O
,	O
so	O
objects	O
can	O
be	O
combined	O
into	O
packs	O
,	O
which	O
use	O
delta	B-Algorithm
compression	I-Algorithm
to	O
save	O
space	O
,	O
storing	O
blobs	B-General_Concept
as	O
their	O
changes	O
relative	O
to	O
other	O
blobs	B-General_Concept
.	O
</s>
<s>
Additionally	O
,	O
git	B-Application
stores	O
labels	O
called	O
refs	O
(	O
short	O
for	O
references	O
)	O
to	O
indicate	O
the	O
locations	O
of	O
various	O
commits	O
.	O
</s>
