1SCALAR(1) Git Manual SCALAR(1)
2
3
4
6 scalar - A tool for managing large Git repositories
7
9 scalar clone [--single-branch] [--branch <main-branch>] [--full-clone]
10 [--[no-]src] <url> [<enlistment>]
11 scalar list
12 scalar register [<enlistment>]
13 scalar unregister [<enlistment>]
14 scalar run ( all | config | commit-graph | fetch | loose-objects | pack-files ) [<enlistment>]
15 scalar reconfigure [ --all | <enlistment> ]
16 scalar diagnose [<enlistment>]
17 scalar delete <enlistment>
18
20 Scalar is a repository management tool that optimizes Git for use in
21 large repositories. Scalar improves performance by configuring advanced
22 Git settings, maintaining repositories in the background, and helping
23 to reduce data sent across the network.
24
25 An important Scalar concept is the enlistment: this is the top-level
26 directory of the project. It usually contains the subdirectory src/
27 which is a Git worktree. This encourages the separation between tracked
28 files (inside src/) and untracked files, such as build artifacts
29 (outside src/). When registering an existing Git worktree with Scalar
30 whose name is not src, the enlistment will be identical to the
31 worktree.
32
33 The scalar command implements various subcommands, and different
34 options depending on the subcommand. With the exception of clone, list
35 and reconfigure --all, all subcommands expect to be run in an
36 enlistment.
37
38 The following options can be specified before the subcommand:
39
40 -C <directory>
41 Before running the subcommand, change the working directory. This
42 option imitates the same option of git(1).
43
44 -c <key>=<value>
45 For the duration of running the specified subcommand, configure
46 this setting. This option imitates the same option of git(1).
47
49 Clone
50 clone [<options>] <url> [<enlistment>]
51 Clones the specified repository, similar to git-clone(1). By
52 default, only commit and tree objects are cloned. Once finished,
53 the worktree is located at <enlistment>/src.
54
55 The sparse-checkout feature is enabled (except when run with
56 --full-clone) and the only files present are those in the top-level
57 directory. Use git sparse-checkout set to expand the set of
58 directories you want to see, or git sparse-checkout disable to
59 expand to all files (see git-sparse-checkout(1) for more details).
60 You can explore the subdirectories outside your sparse-checkout by
61 using git ls-tree HEAD[:<directory>].
62
63 -b <name>, --branch <name>
64 Instead of checking out the branch pointed to by the cloned
65 repository’s HEAD, check out the <name> branch instead.
66
67 --[no-]single-branch
68 Clone only the history leading to the tip of a single branch,
69 either specified by the --branch option or the primary branch
70 remote’s HEAD points at.
71
72 Further fetches into the resulting repository will only update the
73 remote-tracking branch for the branch this option was used for the
74 initial cloning. If the HEAD at the remote did not point at any
75 branch when --single-branch clone was made, no remote-tracking
76 branch is created.
77
78 --[no-]src
79 By default, scalar clone places the cloned repository within a
80 <entlistment>/src directory. Use --no-src to place the cloned
81 repository directly in the <enlistment> directory.
82
83 --[no-]full-clone
84 A sparse-checkout is initialized by default. This behavior can be
85 turned off via --full-clone.
86
87 List
88 list
89 List enlistments that are currently registered by Scalar. This
90 subcommand does not need to be run inside an enlistment.
91
92 Register
93 register [<enlistment>]
94 Adds the enlistment’s repository to the list of registered
95 repositories and starts background maintenance. If <enlistment> is
96 not provided, then the enlistment associated with the current
97 working directory is registered.
98
99 Note: when this subcommand is called in a worktree that is called
100 src/, its parent directory is considered to be the Scalar
101 enlistment. If the worktree is not called src/, it itself will be
102 considered to be the Scalar enlistment.
103
104 Unregister
105 unregister [<enlistment>]
106 Remove the specified repository from the list of repositories
107 registered with Scalar and stop the scheduled background
108 maintenance.
109
110 Run
111 scalar run ( all | config | commit-graph | fetch | loose-objects |
112 pack-files ) [<enlistment>]
113 Run the given maintenance task (or all tasks, if all was
114 specified). Except for all and config, this subcommand simply hands
115 off to git-maintenance(1) (mapping fetch to prefetch and pack-files
116 to incremental-repack).
117
118 These tasks are run automatically as part of the scheduled
119 maintenance, as soon as the repository is registered with Scalar.
120 It should therefore not be necessary to run this subcommand
121 manually.
122
123 The config task is specific to Scalar and configures all those
124 opinionated default settings that make Git work more efficiently
125 with large repositories. As this task is run as part of scalar
126 clone automatically, explicit invocations of this task are rarely
127 needed.
128
129 Reconfigure
130 After a Scalar upgrade, or when the configuration of a Scalar
131 enlistment was somehow corrupted or changed by mistake, this subcommand
132 allows to reconfigure the enlistment.
133
134 With the --all option, all enlistments currently registered with Scalar
135 will be reconfigured. Use this option after each Scalar upgrade.
136
137 Diagnose
138 diagnose [<enlistment>]
139 When reporting issues with Scalar, it is often helpful to provide
140 the information gathered by this command, including logs and
141 certain statistics describing the data shape of the current
142 enlistment.
143
144 The output of this command is a .zip file that is written into a
145 directory adjacent to the worktree in the src directory.
146
147 Delete
148 delete <enlistment>
149 This subcommand lets you delete an existing Scalar enlistment from
150 your local file system, unregistering the repository.
151
153 git-clone(1), git-maintenance(1).
154
156 Part of the git(1) suite
157
158
159
160Git 2.43.0 11/20/2023 SCALAR(1)