3 .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
4 .\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
7 .\" Source: Git 2.46.0.164.g477ce5ccd6
10 .TH "SCALAR" "1" "2024-08-14" "Git 2\&.46\&.0\&.164\&.g477ce5" "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>
47 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\&.
49 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\&.
51 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\&.
53 The following options can be specified \fIbefore\fR the subcommand:
57 Before running the subcommand, change the working directory\&. This option imitates the same option of
63 For the duration of running the specified subcommand, configure this setting\&. This option imitates the same option of
69 clone [<options>] <url> [<enlistment>]
71 Clones the specified repository, similar to
72 \fBgit-clone\fR(1)\&. By default, only commit and tree objects are cloned\&. Once finished, the worktree is located at
73 \fB<enlistment>/src\fR\&.
75 The sparse\-checkout feature is enabled (except when run with
76 \fB\-\-full\-clone\fR) and the only files present are those in the top\-level directory\&. Use
77 \fBgit sparse\-checkout set\fR
78 to expand the set of directories you want to see, or
79 \fBgit sparse\-checkout disable\fR
80 to expand to all files (see
81 \fBgit-sparse-checkout\fR(1)
82 for more details)\&. You can explore the subdirectories outside your sparse\-checkout by using
83 \fBgit ls\-tree HEAD[:<directory>]\fR\&.
86 \-b <name>, \-\-branch <name>
88 Instead of checking out the branch pointed to by the cloned repository\(cqs HEAD, check out the
93 \-\-[no\-]single\-branch
95 Clone only the history leading to the tip of a single branch, either specified by the
97 option or the primary branch remote\(cqs
101 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
102 \fB\-\-single\-branch\fR
103 clone was made, no remote\-tracking branch is created\&.
110 places the cloned repository within a
111 \fB<entlistment>/src\fR
114 to place the cloned repository directly in the
119 \-\-[no\-]full\-clone
121 A sparse\-checkout is initialized by default\&. This behavior can be turned off via
122 \fB\-\-full\-clone\fR\&.
128 List enlistments that are currently registered by Scalar\&. This subcommand does not need to be run inside an enlistment\&.
132 register [<enlistment>]
134 Adds the enlistment\(cqs repository to the list of registered repositories and starts background maintenance\&. If
136 is not provided, then the enlistment associated with the current working directory is registered\&.
138 Note: when this subcommand is called in a worktree that is called
139 \fBsrc/\fR, its parent directory is considered to be the Scalar enlistment\&. If the worktree is
142 \fBsrc/\fR, it itself will be considered to be the Scalar enlistment\&.
146 unregister [<enlistment>]
148 Remove the specified repository from the list of repositories registered with Scalar and stop the scheduled background maintenance\&.
152 scalar run ( all | config | commit\-graph | fetch | loose\-objects | pack\-files ) [<enlistment>]
154 Run the given maintenance task (or all tasks, if
156 was specified)\&. Except for
159 \fBconfig\fR, this subcommand simply hands off to
160 \fBgit-maintenance\fR(1)
168 \fBincremental\-repack\fR)\&.
170 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\&.
174 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
176 automatically, explicit invocations of this task are rarely needed\&.
180 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\&.
182 With the \fB\-\-all\fR option, all enlistments currently registered with Scalar will be reconfigured\&. Use this option after each Scalar upgrade\&.
185 diagnose [<enlistment>]
187 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\&.
189 The output of this command is a
191 file that is written into a directory adjacent to the worktree in the
199 This subcommand lets you delete an existing Scalar enlistment from your local file system, unregistering the repository\&.
203 \fBgit-clone\fR(1), \fBgit-maintenance\fR(1)\&.
206 Part of the \fBgit\fR(1) suite