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