Blame


1 5c860e29 2018-03-12 stsp .\"
2 5c860e29 2018-03-12 stsp .\" Copyright (c) 2017 Martin Pieuchot
3 5c860e29 2018-03-12 stsp .\"
4 5c860e29 2018-03-12 stsp .\" Permission to use, copy, modify, and distribute this software for any
5 5c860e29 2018-03-12 stsp .\" purpose with or without fee is hereby granted, provided that the above
6 5c860e29 2018-03-12 stsp .\" copyright notice and this permission notice appear in all copies.
7 5c860e29 2018-03-12 stsp .\"
8 5c860e29 2018-03-12 stsp .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 5c860e29 2018-03-12 stsp .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 5c860e29 2018-03-12 stsp .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 5c860e29 2018-03-12 stsp .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 5c860e29 2018-03-12 stsp .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 5c860e29 2018-03-12 stsp .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 5c860e29 2018-03-12 stsp .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 5c860e29 2018-03-12 stsp .\"
16 5c860e29 2018-03-12 stsp .Dd $Mdocdate$
17 5c860e29 2018-03-12 stsp .Dt GOT 1
18 5c860e29 2018-03-12 stsp .Os
19 5c860e29 2018-03-12 stsp .Sh NAME
20 5c860e29 2018-03-12 stsp .Nm got
21 97925469 2018-03-17 stsp .Nd version control system
22 5c860e29 2018-03-12 stsp .Sh SYNOPSIS
23 0bb8a95e 2018-03-12 stsp .Nm
24 5c860e29 2018-03-12 stsp .Ar command
25 1b6b95a8 2018-03-12 stsp .Op Fl h
26 5c860e29 2018-03-12 stsp .Op Ar arg ...
27 5c860e29 2018-03-12 stsp .Sh DESCRIPTION
28 5c860e29 2018-03-12 stsp .Nm
29 97925469 2018-03-17 stsp is a version control system which prioritizes ease of use and simplicity
30 97925469 2018-03-17 stsp over flexibility.
31 5c860e29 2018-03-12 stsp .Pp
32 285dc8a4 2018-03-13 stsp .Nm
33 97925469 2018-03-17 stsp stores the history of tracked files in a repository which happens to use
34 97925469 2018-03-17 stsp the same on-disk format as
35 285dc8a4 2018-03-13 stsp .Dq bare
36 97925469 2018-03-17 stsp repositories used by the popular Git version control system.
37 285dc8a4 2018-03-13 stsp This repository format is described in
38 285dc8a4 2018-03-13 stsp .Xr got-repository 5 .
39 285dc8a4 2018-03-13 stsp .Pp
40 4129c201 2018-03-13 stsp .Nm
41 4129c201 2018-03-13 stsp is a
42 97925469 2018-03-17 stsp .Em distributed
43 4129c201 2018-03-13 stsp version control system because every copy of a repository is writeable.
44 4129c201 2018-03-13 stsp Modifications made to files can be synchronized between repositories
45 97925469 2018-03-17 stsp at any time.
46 4129c201 2018-03-13 stsp .Pp
47 285dc8a4 2018-03-13 stsp Files managed by
48 285dc8a4 2018-03-13 stsp .Nm
49 4129c201 2018-03-13 stsp must be checked out from the repository for modification.
50 285dc8a4 2018-03-13 stsp Checked out files are stored in a
51 285dc8a4 2018-03-13 stsp .Em work tree
52 c5867b47 2018-03-13 stsp which can be placed at an arbitrary directory in the filesystem hierarchy.
53 97925469 2018-03-17 stsp The on-disk format of a
54 285dc8a4 2018-03-13 stsp .Nm
55 285dc8a4 2018-03-13 stsp work tree is described in
56 285dc8a4 2018-03-13 stsp .Xr got-worktree 5 .
57 285dc8a4 2018-03-13 stsp .Pp
58 285dc8a4 2018-03-13 stsp .Nm
59 285dc8a4 2018-03-13 stsp provides global and command-specific options.
60 285dc8a4 2018-03-13 stsp Global options must preceed the command name, and are as follows:
61 1b6b95a8 2018-03-12 stsp .Bl -tag -width tenletters
62 1b6b95a8 2018-03-12 stsp .It Fl h
63 1b6b95a8 2018-03-12 stsp Display usage information.
64 1b6b95a8 2018-03-12 stsp .El
65 1b6b95a8 2018-03-12 stsp .Pp
66 5c860e29 2018-03-12 stsp The commands are as follows:
67 0bb8a95e 2018-03-12 stsp .Bl -tag -width checkout
68 5d7c1dab 2018-04-01 stsp .It Cm checkout [ Fl p Ar path-prefix ] repository-path [ work-tree-path ]
69 0bb8a95e 2018-03-12 stsp Copy files from a repository into a new work tree.
70 67d6b2d2 2018-03-13 stsp The work tree may be restricted to a subset of the repository's tree
71 67d6b2d2 2018-03-13 stsp hierarchy by specifying the
72 5d7c1dab 2018-04-01 stsp .Fl p Ar path-prefix
73 67d6b2d2 2018-03-13 stsp option.
74 5d7c1dab 2018-04-01 stsp In this case, only files beneath the specified prefix will
75 67d6b2d2 2018-03-13 stsp be checked out.
76 5d7c1dab 2018-04-01 stsp If the
77 5d7c1dab 2018-04-01 stsp .Ar work tree path
78 5d7c1dab 2018-04-01 stsp is not specified, either use the base name of the
79 5d7c1dab 2018-04-01 stsp .Ar repository path ,
80 5d7c1dab 2018-04-01 stsp or if a
81 5d7c1dab 2018-04-01 stsp .Ar path prefix
82 5d7c1dab 2018-04-01 stsp was specified use the base name of the
83 5d7c1dab 2018-04-01 stsp .Ar path prefix .
84 0bb8a95e 2018-03-12 stsp .\".It Cm status
85 0bb8a95e 2018-03-12 stsp .\"Show current status of files.
86 64a96a6d 2018-04-01 stsp .It Cm log [ Fl p ] [ Fl c Ar commit ] [ Fl l Ar N ] [ Ar repository-path ]
87 5c860e29 2018-03-12 stsp Display history of the repository.
88 79109fed 2018-03-27 stsp If the
89 79109fed 2018-03-27 stsp .Fl p
90 64a96a6d 2018-04-01 stsp option is given, display the patch of modifications made in each commit.
91 d142fc45 2018-04-01 stsp If a
92 d142fc45 2018-04-01 stsp .Ar commit
93 d142fc45 2018-04-01 stsp is specified with the
94 d142fc45 2018-04-01 stsp .Fl c
95 d142fc45 2018-04-01 stsp option, start traversing history at this commit.
96 64a96a6d 2018-04-01 stsp The
97 21294684 2018-04-01 stsp .Ar commit
98 21294684 2018-04-01 stsp argument is a SHA1 hash which corresponds to the commit object.
99 21294684 2018-04-01 stsp The
100 64a96a6d 2018-04-01 stsp .Fl l
101 64a96a6d 2018-04-01 stsp option limits the output to a number of
102 64a96a6d 2018-04-01 stsp .Ar N
103 64a96a6d 2018-04-01 stsp commits.
104 d142fc45 2018-04-01 stsp If the
105 d142fc45 2018-04-01 stsp .Ar repository path
106 d142fc45 2018-04-01 stsp is omitted, use the current working directory.
107 3f8b7d6a 2018-04-01 stsp .It Cm diff [ Ar repository-path ] Ar object1 Ar object2
108 3f8b7d6a 2018-04-01 stsp Display the differences between two objects in the repository.
109 21294684 2018-04-01 stsp Each
110 21294684 2018-04-01 stsp .Ar object
111 21294684 2018-04-01 stsp argument is a SHA1 hash which corresponds to the object.
112 3f8b7d6a 2018-04-01 stsp Both objects must be of the same type (blobs, trees, or commits).
113 3f8b7d6a 2018-04-01 stsp If the
114 3f8b7d6a 2018-04-01 stsp .Ar repository path
115 3f8b7d6a 2018-04-01 stsp is omitted, use the current working directory.
116 5c860e29 2018-03-12 stsp .El
117 5c860e29 2018-03-12 stsp .Sh EXIT STATUS
118 5c860e29 2018-03-12 stsp .Ex -std got
119 97925469 2018-03-17 stsp .Sh EXAMPLES
120 97925469 2018-03-17 stsp Check out a work tree of
121 97925469 2018-03-17 stsp .Ox
122 97925469 2018-03-17 stsp kernel sources from a Git repository at /var/repo/openbsd-src to ~/sys:
123 97925469 2018-03-17 stsp .Pp
124 97925469 2018-03-17 stsp .Dl $ got checkout -p sys /var/repo/openbsd-src ~/sys
125 5c860e29 2018-03-12 stsp .Sh SEE ALSO
126 285dc8a4 2018-03-13 stsp .Xr got-repository 5
127 285dc8a4 2018-03-13 stsp .Xr got-worktree 5