3 .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
7 .\" Source: Git 2.43.0.522.g2a540e432f
10 .TH "SCALAR" "1" "2024\-02\-02" "Git 2\&.43\&.0\&.522\&.g2a540e" "Git Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 scalar \- A tool for managing large Git repositories
35 scalar clone [\-\-single\-branch] [\-\-branch <main\-branch>] [\-\-full\-clone]
36 [\-\-[no\-]src] <url> [<enlistment>]
38 scalar register [<enlistment>]
39 scalar unregister [<enlistment>]
40 scalar run ( all | config | commit\-graph | fetch | loose\-objects | pack\-files ) [<enlistment>]
41 scalar reconfigure [ \-\-all | <enlistment> ]
42 scalar diagnose [<enlistment>]
43 scalar delete <enlistment>
48 Scalar is a repository management tool that optimizes Git for use in large repositories\&. Scalar improves performance by configuring advanced Git settings, maintaining repositories in the background, and helping to reduce data sent across the network\&.
50 An important Scalar concept is the enlistment: this is the top\-level directory of the project\&. It usually contains the subdirectory \fBsrc/\fR which is a Git worktree\&. This encourages the separation between tracked files (inside \fBsrc/\fR) and untracked files, such as build artifacts (outside \fBsrc/\fR)\&. When registering an existing Git worktree with Scalar whose name is not \fBsrc\fR, the enlistment will be identical to the worktree\&.
52 The \fBscalar\fR command implements various subcommands, and different options depending on the subcommand\&. With the exception of \fBclone\fR, \fBlist\fR and \fBreconfigure \-\-all\fR, all subcommands expect to be run in an enlistment\&.
54 The following options can be specified \fIbefore\fR the subcommand:
58 Before running the subcommand, change the working directory\&. This option imitates the same option of
64 For the duration of running the specified subcommand, configure this setting\&. This option imitates the same option of
70 clone [<options>] <url> [<enlistment>]
72 Clones the specified repository, similar to
73 \fBgit-clone\fR(1)\&. By default, only commit and tree objects are cloned\&. Once finished, the worktree is located at
74 \fB<enlistment>/src\fR\&.
76 The sparse\-checkout feature is enabled (except when run with
77 \fB\-\-full\-clone\fR) and the only files present are those in the top\-level directory\&. Use
78 \fBgit sparse\-checkout set\fR
79 to expand the set of directories you want to see, or
80 \fBgit sparse\-checkout disable\fR
81 to expand to all files (see
82 \fBgit-sparse-checkout\fR(1)
83 for more details)\&. You can explore the subdirectories outside your sparse\-checkout by using
84 \fBgit ls\-tree HEAD[:<directory>]\fR\&.
87 \-b <name>, \-\-branch <name>
89 Instead of checking out the branch pointed to by the cloned repository\(cqs HEAD, check out the
94 \-\-[no\-]single\-branch
96 Clone only the history leading to the tip of a single branch, either specified by the
98 option or the primary branch remote\(cqs
102 Further fetches into the resulting repository will only update the remote\-tracking branch for the branch this option was used for the initial cloning\&. If the HEAD at the remote did not point at any branch when
103 \fB\-\-single\-branch\fR
104 clone was made, no remote\-tracking branch is created\&.
111 places the cloned repository within a
112 \fB<entlistment>/src\fR
115 to place the cloned repository directly in the
120 \-\-[no\-]full\-clone
122 A sparse\-checkout is initialized by default\&. This behavior can be turned off via
123 \fB\-\-full\-clone\fR\&.
129 List enlistments that are currently registered by Scalar\&. This subcommand does not need to be run inside an enlistment\&.
133 register [<enlistment>]
135 Adds the enlistment\(cqs repository to the list of registered repositories and starts background maintenance\&. If
137 is not provided, then the enlistment associated with the current working directory is registered\&.
139 Note: when this subcommand is called in a worktree that is called
140 \fBsrc/\fR, its parent directory is considered to be the Scalar enlistment\&. If the worktree is
143 \fBsrc/\fR, it itself will be considered to be the Scalar enlistment\&.
147 unregister [<enlistment>]
149 Remove the specified repository from the list of repositories registered with Scalar and stop the scheduled background maintenance\&.
153 scalar run ( all | config | commit\-graph | fetch | loose\-objects | pack\-files ) [<enlistment>]
155 Run the given maintenance task (or all tasks, if
157 was specified)\&. Except for
160 \fBconfig\fR, this subcommand simply hands off to
161 \fBgit-maintenance\fR(1)
169 \fBincremental\-repack\fR)\&.
171 These tasks are run automatically as part of the scheduled maintenance, as soon as the repository is registered with Scalar\&. It should therefore not be necessary to run this subcommand manually\&.
175 task is specific to Scalar and configures all those opinionated default settings that make Git work more efficiently with large repositories\&. As this task is run as part of
177 automatically, explicit invocations of this task are rarely needed\&.
181 After a Scalar upgrade, or when the configuration of a Scalar enlistment was somehow corrupted or changed by mistake, this subcommand allows to reconfigure the enlistment\&.
183 With the \fB\-\-all\fR option, all enlistments currently registered with Scalar will be reconfigured\&. Use this option after each Scalar upgrade\&.
186 diagnose [<enlistment>]
188 When reporting issues with Scalar, it is often helpful to provide the information gathered by this command, including logs and certain statistics describing the data shape of the current enlistment\&.
190 The output of this command is a
192 file that is written into a directory adjacent to the worktree in the
200 This subcommand lets you delete an existing Scalar enlistment from your local file system, unregistering the repository\&.
204 \fBgit-clone\fR(1), \fBgit-maintenance\fR(1)\&.
207 Part of the \fBgit\fR(1) suite