2 .\" Copyright (c) 2020 Stefan Sperling <stsp@openbsd.org>
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 Game of Trees configuration file
24 is the run-time configuration file for
28 may be present in the root directory of a Git repository for
29 repository-wide settings, or in the
31 meta-data directory of a work tree to override repository-wide
34 commands executed within this work tree.
36 The file format is line-based, with one configuration directive per line.
37 Any lines beginning with a
39 are treated as comments and ignored.
41 The available configuration directives are as follows:
43 .It Ic author Dq Real Name <email address>
44 Configure the author's name and email address for
48 when operating on this repository.
49 Author information specified here overrides the
55 may fail to parse commits without an email address in author data,
57 attempts to reject author information with a missing email address.
58 .It Ic remote Ar name Brq ...
59 Define a remote repository.
62 can be used to refer to the remote repository on the command line of
67 Information about this repository is declared in a block of options
68 enclosed in curly brackets:
70 .It Ic server Ar hostname
71 Defines the hostname to use for contacting the remote repository's server.
72 .It Ic repository Ar path
73 Defines the path to the repository on the remote repository's server.
74 .It Ic protocol Ar scheme
75 Defines the protocol to use for communicating with the remote repository's
78 The following protocol schemes are supported:
79 .Bl -tag -width git+ssh
81 The Git protocol as implemented by the
84 Use of this protocol is discouraged since it supports neither authentication
87 The Git protocol wrapped in an authenticated and encrypted
90 With this protocol the hostname may contain an embedded username for
95 Short alias for git+ssh.
98 Defines the port to use for connecting to the remote repository's server.
101 can be specified by number or name.
102 The port name to number mappings are found in the file
107 If not specified, the default port of the specified
110 .It Ic branch Brq Ar branch ...
111 Specify one or more branches which
115 should fetch from and send to the remote repository by default.
116 The list of branches specified here can be overridden at the
120 command lines with the
123 .It Ic fetch-all-branches Ar yes | no
124 This option controls whether
126 will fetch all branches from the remote repository by default.
127 If enabled, this behaviour can be overridden at the
129 command line with the
133 configuration settings for this remote repository will be ignored.
134 .It Ic reference Brq Ar reference ...
135 Specify one or more arbitrary references which
137 should fetch by default, in addition to the branches and tags that will
139 The list of references specified here can be overridden at the
141 command line with the
145 will refuse to fetch references from the remote repository's
150 In any case, references in the
152 namespace will always be fetched and mapped directly to local references
153 in the same namespace.
154 .It Ic mirror-references Ar yes | no
155 This option controls the behaviour of
157 when updating references.
158 .Sy Enabling this option can lead to the loss of local commits.
159 Maintaining custom changes in a mirror repository is therefore discouraged.
161 If this option is not specified or set to
164 will map references of the remote repository into the local repository's
168 If this option is set to
172 namespace will be updated directly to match the corresponding branches in
173 the remote repository.
177 block may contain any of the following configuration settings
180 overriding corresponding settings in the containing
181 .Ic remote Ar name Brq ...
185 .Ic server Ar hostname
187 .Ic repository Ar path
189 .Ic protocol Ar scheme
193 .Ic branch Brq Ar branch ...
198 block may contain any of the following configuration settings
201 overriding corresponding settings in the containing
202 .Ic remote Ar name Brq ...
206 .Ic server Ar hostname
208 .Ic repository Ar path
210 .Ic protocol Ar scheme
214 .Ic branch Brq Ar branch ...
219 Configure author information:
220 .Bd -literal -offset indent
221 author "Flan Hacker <flan_hacker@openbsd.org>"
224 Remote repository specification for the Game of Trees repository:
225 .Bd -literal -offset indent
227 server git.gameoftrees.org
236 src repository from Github:
237 .Bd -literal -offset indent
239 repository "openbsd/src"
240 server git@github.com
242 mirror-references yes
246 Fetch changes via the Git protocol and send changes via the SSH protocol:
247 .Bd -literal -offset indent
250 server git.example.com
253 server git@git.example.com
259 .Bl -tag -width Ds -compact
263 located in the root directory of a Git repository supersedes any relevant
273 meta-data directory of a
275 work tree supersedes any relevant settings in the repository's
277 configuration file and Git's
283 .Xr git-repository 5 ,
287 offers no way to configure the editor spawned by
293 This is deliberate and prevents potential arbitrary command execution
294 as another user when repositories or work trees are shared between users.
295 Users should set their
299 environment variables instead.