Blob


1 .\"
2 .\" Copyright (c) 2017 Martin Pieuchot
3 .\"
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.
7 .\"
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.
15 .\"
16 .Dd $Mdocdate$
17 .Dt GOT 1
18 .Os
19 .Sh NAME
20 .Nm got
21 .Nd version control system
22 .Sh SYNOPSIS
23 .Nm
24 .Ar command
25 .Op Fl h
26 .Op Ar arg ...
27 .Sh DESCRIPTION
28 .Nm
29 is a version control system which prioritizes ease of use and simplicity
30 over flexibility.
31 .Pp
32 .Nm
33 stores the history of tracked files in a repository which happens to use
34 the same on-disk format as
35 .Dq bare
36 repositories used by the popular Git version control system.
37 This repository format is described in
38 .Xr got-repository 5 .
39 .Pp
40 .Nm
41 is a
42 .Em distributed
43 version control system because every copy of a repository is writeable.
44 Modifications made to files can be synchronized between repositories
45 at any time.
46 .Pp
47 Files managed by
48 .Nm
49 must be checked out from the repository for modification.
50 Checked out files are stored in a
51 .Em work tree
52 which can be placed at an arbitrary directory in the filesystem hierarchy.
53 The on-disk format of a
54 .Nm
55 work tree is described in
56 .Xr got-worktree 5 .
57 .Pp
58 .Nm
59 provides global and command-specific options.
60 Global options must preceed the command name, and are as follows:
61 .Bl -tag -width tenletters
62 .It Fl h
63 Display usage information.
64 .El
65 .Pp
66 The commands are as follows:
67 .Bl -tag -width checkout
68 .It Cm checkout
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
72 .Fl p Ar prefix
73 option.
74 In this case, only files beneath the specified directory prefix will
75 be checked out.
76 .\".It Cm status
77 .\"Show current status of files.
78 .It Cm log
79 Display history of the repository.
80 .El
81 .Sh EXIT STATUS
82 .Ex -std got
83 .Sh EXAMPLES
84 Check out a work tree of
85 .Ox
86 kernel sources from a Git repository at /var/repo/openbsd-src to ~/sys:
87 .Pp
88 .Dl $ got checkout -p sys /var/repo/openbsd-src ~/sys
89 .Sh SEE ALSO
90 .Xr got-repository 5
91 .Xr got-worktree 5