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