git-repo.1 (3587B)
1 .\" Copyright (C) 2024, 2025 |Méso|Star> (contact@meso-star.com) 2 .\" 3 .\" This program is free software: you can redistribute it and/or modify 4 .\" it under the terms of the GNU General Public License as published by 5 .\" the Free Software Foundation, either version 3 of the License, or 6 .\" (at your option) any later version. 7 .\" 8 .\" This program is distributed in the hope that it will be useful, 9 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of 10 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 .\" GNU General Public License for more details. 12 .\" 13 .\" You should have received a copy of the GNU General Public License 14 .\" along with this program. If not, see <http://www.gnu.org/licenses/>. 15 .Dd December 3, 2025 16 .Dt GIT-REPO 1 17 .Os 18 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 19 .Sh NAME 20 .Nm git-repo 21 .Nd setting up a bare repository 22 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 23 .Sh SYNOPSIS 24 .Nm 25 .Op Fl Ddp 26 .Op Fl s Ar group 27 .Ar directory 28 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 29 .Sh DESCRIPTION 30 .Nm 31 helps to set up a git bare repository. 32 If the input 33 .Ar directory 34 does not exist, it is created and initialized as a bare git repository 35 before being configured according to the defined options. 36 Otherwise, 37 .Nm 38 verifies that the given 39 .Ar directory 40 is indeed a bare git repository before updating its configuration. 41 .Pp 42 The options are as follows: 43 .Bl -tag -width Ds 44 .It Fl D 45 Disable read access via the HTTP[S] protocol, i.e., disable dumb 46 transport. 47 This is the default configuration for the repository. 48 .It Fl d 49 Prepare the repository for read-only access via the HTTP[S] protocol, 50 i.e., for use over dumb transports. 51 .It Fl p 52 Make the repository private, i.e., define the group as the effective 53 group as returned by 54 .Ql id -gn 55 and restore the group's default permissions, most likely read-only 56 access. 57 .It Fl s Ar group 58 Share write access to the given 59 .Ar group 60 so that each member of the group can update the repository. 61 .Pp 62 Once shared, internal files belong to the users who created them, so the 63 repository is effectively owned by the co-authors. 64 Consequently, all users, including the one who created and shared the 65 repository, have write access via their group ID rather than their user 66 ID. 67 It is therefore impossible to privatize a shared repository 68 .Po 69 option 70 .Fl p 71 .Pc 72 or update its group if a co-author has already pushed updates. 73 .El 74 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 75 .Sh EXIT 76 .Ex -std 77 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 78 .Sh EXAMPLES 79 Set up a regular bare repository: 80 .Bd -literal -offset Ds 81 git repo /path/to/the/git/repository.git 82 .Ed 83 .Pp 84 Set up a bare repository with write access shared with the 85 .Ar users 86 group: 87 .Bd -literal -offset Ds 88 git repo -s users /path/to/the/git/repository.git 89 .Ed 90 .Pp 91 Same as above, but enables dumb transports to allow read-only access via 92 HTTP[S]: 93 .Bd -literal -offset Ds 94 git repo -ds users /path/to/the/git/repository.git 95 .Ed 96 .Pp 97 Create a regular bare repository. 98 Update it to enable dumb transports. 99 Then give write access to the 100 .Ar users 101 group. 102 Finally, cancel support for dumb transports but retain shared write 103 access with 104 .Ar users . 105 .Bd -literal -offset Ds 106 git repo /path/to/the/git/repository.git 107 git repo -d /path/to/the/git/repository.git 108 git repo -s users /path/to/the/git/repository.git 109 git repo -D /path/to/the/git/repository.git 110 .Ed 111 .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 112 .Sh SEE ALSO 113 .Xr git 1