Blame


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