Blame


1 48a3b934 2018-03-13 stsp .\"
2 48a3b934 2018-03-13 stsp .\" Copyright (c) 2018 Stefan Sperling <stsp@openbsd.org>
3 48a3b934 2018-03-13 stsp .\"
4 48a3b934 2018-03-13 stsp .\" Permission to use, copy, modify, and distribute this software for any
5 48a3b934 2018-03-13 stsp .\" purpose with or without fee is hereby granted, provided that the above
6 48a3b934 2018-03-13 stsp .\" copyright notice and this permission notice appear in all copies.
7 48a3b934 2018-03-13 stsp .\"
8 48a3b934 2018-03-13 stsp .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 48a3b934 2018-03-13 stsp .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 48a3b934 2018-03-13 stsp .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 48a3b934 2018-03-13 stsp .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 48a3b934 2018-03-13 stsp .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 48a3b934 2018-03-13 stsp .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 48a3b934 2018-03-13 stsp .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 48a3b934 2018-03-13 stsp .\"
16 48a3b934 2018-03-13 stsp .Dd $Mdocdate$
17 48a3b934 2018-03-13 stsp .Dt GOT-REPOSITORY 5
18 48a3b934 2018-03-13 stsp .Os
19 48a3b934 2018-03-13 stsp .Sh NAME
20 48a3b934 2018-03-13 stsp .Nm got-repository
21 48a3b934 2018-03-13 stsp .Nd format of
22 48a3b934 2018-03-13 stsp .Xr got 1
23 48a3b934 2018-03-13 stsp repositories
24 48a3b934 2018-03-13 stsp .Sh DESCRIPTION
25 48a3b934 2018-03-13 stsp .Xr got 1
26 70f9e387 2018-04-01 stsp stores the history of tracked files in a repository which uses
27 97925469 2018-03-17 stsp the same on-disk format as
28 48a3b934 2018-03-13 stsp .Dq bare
29 70f9e387 2018-04-01 stsp repositories used by the Git version control system.
30 48a3b934 2018-03-13 stsp .Pp
31 48a3b934 2018-03-13 stsp The repository's core data model is a directed acyclic graph which
32 48a3b934 2018-03-13 stsp contains three types of objects as nodes.
33 48a3b934 2018-03-13 stsp Each object is identified by the SHA-1 hash calculated over the object's
34 48a3b934 2018-03-13 stsp header plus the content stored in the object.
35 48a3b934 2018-03-13 stsp The object header names the type of object in an ASCII string, which is
36 48a3b934 2018-03-13 stsp followed by a space, followed by the size of data in the object encoded
37 48a3b934 2018-03-13 stsp as an ASCII number string.
38 48a3b934 2018-03-13 stsp This header is terminated by a
39 48a3b934 2018-03-13 stsp .Sy NUL
40 48a3b934 2018-03-13 stsp character.
41 48a3b934 2018-03-13 stsp .Pp
42 48a3b934 2018-03-13 stsp The content of files tracked under version control is stored in objects
43 48a3b934 2018-03-13 stsp of type
44 48a3b934 2018-03-13 stsp .Em blob .
45 48a3b934 2018-03-13 stsp .Pp
46 48a3b934 2018-03-13 stsp A
47 48a3b934 2018-03-13 stsp .Em tree
48 48a3b934 2018-03-13 stsp object points to any number of such blobs, and also to other trees
49 48a3b934 2018-03-13 stsp in order to form a hierarchy of files and directories.
50 48a3b934 2018-03-13 stsp .Pp
51 48a3b934 2018-03-13 stsp A
52 48a3b934 2018-03-13 stsp .Em commit
53 48a3b934 2018-03-13 stsp object points to the root element of one tree, and thus records the
54 48a3b934 2018-03-13 stsp state of this entire tree as a snapshot.
55 48a3b934 2018-03-13 stsp Commit objects are chained together and thus form a line of history
56 48a3b934 2018-03-13 stsp of snapshots.
57 48a3b934 2018-03-13 stsp A given commit can be suceeded by an arbitrary number of subsequent
58 48a3b934 2018-03-13 stsp commits, such that diverging lines of version control history, known as
59 48a3b934 2018-03-13 stsp .Em branches ,
60 48a3b934 2018-03-13 stsp can be represented.
61 48a3b934 2018-03-13 stsp A commit which preceeds another commit is referred to as that other commit's
62 48a3b934 2018-03-13 stsp .Em parent commit .
63 48a3b934 2018-03-13 stsp A commit with multiple parents reunites diverged lines of history and is
64 48a3b934 2018-03-13 stsp known as a
65 48a3b934 2018-03-13 stsp .Em merge commit .
66 48a3b934 2018-03-13 stsp While the data model allows for commits with an arbitrary number of
67 48a3b934 2018-03-13 stsp parent commits,
68 48a3b934 2018-03-13 stsp .Xr got 1
69 48a3b934 2018-03-13 stsp restricts all commits to at most 2 parents in order to discourage chaotic
70 48a3b934 2018-03-13 stsp branching and merging practices.
71 48a3b934 2018-03-13 stsp .Pp
72 48a3b934 2018-03-13 stsp When stored on disk, all objects are compressed with
73 48a3b934 2018-03-13 stsp .Xr deflate 3 .
74 48a3b934 2018-03-13 stsp Mulitple objects may be stored together in a
75 48a3b934 2018-03-13 stsp .Em pack file
76 48a3b934 2018-03-13 stsp which provides for deltification of object content.
77 48a3b934 2018-03-13 stsp .Sh FILES
78 48a3b934 2018-03-13 stsp .Bl -tag -width /etc/rpc -compact
79 48a3b934 2018-03-13 stsp .It Pa HEAD
80 48a3b934 2018-03-13 stsp .It Pa ORIG_HEAD
81 48a3b934 2018-03-13 stsp .It Pa FETCH_HEAD
82 48a3b934 2018-03-13 stsp .It Pa branches/
83 48a3b934 2018-03-13 stsp .It Pa config
84 48a3b934 2018-03-13 stsp .It Pa description
85 48a3b934 2018-03-13 stsp .It Pa hooks/
86 48a3b934 2018-03-13 stsp .It Pa index
87 48a3b934 2018-03-13 stsp .It Pa info
88 48a3b934 2018-03-13 stsp .It Pa logs/
89 48a3b934 2018-03-13 stsp .It Pa objects/
90 48a3b934 2018-03-13 stsp .It Pa packed-refs
91 48a3b934 2018-03-13 stsp .It Pa refs/
92 48a3b934 2018-03-13 stsp .El
93 48a3b934 2018-03-13 stsp .Sh SEE ALSO
94 48a3b934 2018-03-13 stsp .Xr git 1 ,
95 48a3b934 2018-03-13 stsp .Xr got 1 ,
96 48a3b934 2018-03-13 stsp .Xr deflate 3 ,
97 48a3b934 2018-03-13 stsp .Xr got-worktree 5
98 48a3b934 2018-03-13 stsp .Sh HISTORY
99 48a3b934 2018-03-13 stsp The Git repository format was conceived by Linus Torvalds in 2005.