2 .\" Copyright (c) 2017 Martin Pieuchot
4 .\" Permission to use, copy, modify, and distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 .Nd version control system
29 is a version control system which prioritizes ease of use and simplicity
33 stores the history of tracked files in a repository which happens to use
34 the same on-disk format as
36 repositories used by the popular Git version control system.
37 This repository format is described in
38 .Xr got-repository 5 .
43 version control system because every copy of a repository is writeable.
44 Modifications made to files can be synchronized between repositories
49 must be checked out from the repository for modification.
50 Checked out files are stored in a
52 which can be placed at an arbitrary directory in the filesystem hierarchy.
53 The on-disk format of a
55 work tree is described in
59 provides global and command-specific options.
60 Global options must preceed the command name, and are as follows:
61 .Bl -tag -width tenletters
63 Display usage information.
66 The commands are as follows:
67 .Bl -tag -width checkout
68 .It Cm checkout [ Fl p Ar path-prefix ] repository-path [ work-tree-path ]
69 Copy files from a repository into a new work tree.
70 The work tree may be restricted to a subset of the repository's tree
71 hierarchy by specifying the
74 In this case, only files beneath the specified prefix will
78 is not specified, either use the base name of the
82 was specified use the base name of the
85 .\"Show current status of files.
86 .It Cm log [ Fl p ] [ Fl c Ar commit ] [ Fl l Ar N ] [ Ar repository-path ]
87 Display history of the repository.
90 option is given, display the patch of modifications made in each commit.
95 option, start traversing history at this commit.
98 argument is a SHA1 hash which corresponds to the commit object.
101 option limits the output to a number of
106 is omitted, use the current working directory.
107 .It Cm diff [ Ar repository-path ] Ar object1 Ar object2
108 Display the differences between two objects in the repository.
111 argument is a SHA1 hash which corresponds to the object.
112 Both objects must be of the same type (blobs, trees, or commits).
115 is omitted, use the current working directory.
120 Check out a work tree of
122 kernel sources from a Git repository at /var/repo/openbsd-src to ~/sys:
124 .Dl $ got checkout -p sys /var/repo/openbsd-src ~/sys