mirror of
https://github.com/git/git
synced 2024-09-19 08:21:36 +00:00
546f822d53
This implements Scalar's opinionated `clone` command: it tries to use a partial clone and sets up a sparse checkout by default. In contrast to `git clone`, `scalar clone` sets up the worktree in the `src/` subdirectory, to encourage a separation between the source files and the build output (which helps Git tremendously because it avoids untracked files that have to be specifically ignored when refreshing the index). Also, it registers the repository for regular, scheduled maintenance, and configures a flurry of configuration settings based on the experience and experiments of the Microsoft Windows and the Microsoft Office development teams. Note: since the `scalar clone` command is by far the most commonly called `scalar` subcommand, we document it at the top of the manual page. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
98 lines
3.1 KiB
Plaintext
98 lines
3.1 KiB
Plaintext
scalar(1)
|
|
=========
|
|
|
|
NAME
|
|
----
|
|
scalar - an opinionated repository management tool
|
|
|
|
SYNOPSIS
|
|
--------
|
|
[verse]
|
|
scalar clone [--branch <main-branch>] [--full-clone] <url> [<enlistment>]
|
|
scalar list
|
|
scalar register [<enlistment>]
|
|
scalar unregister [<enlistment>]
|
|
|
|
DESCRIPTION
|
|
-----------
|
|
|
|
Scalar is an opinionated repository management tool. By creating new
|
|
repositories or registering existing repositories with Scalar, your Git
|
|
experience will speed up. Scalar sets advanced Git config settings,
|
|
maintains your repositories in the background, and helps reduce data sent
|
|
across the network.
|
|
|
|
An important Scalar concept is the enlistment: this is the top-level directory
|
|
of the project. It usually contains the subdirectory `src/` which is a Git
|
|
worktree. This encourages the separation between tracked files (inside `src/`)
|
|
and untracked files, such as build artifacts (outside `src/`). When registering
|
|
an existing Git worktree with Scalar whose name is not `src`, the enlistment
|
|
will be identical to the worktree.
|
|
|
|
The `scalar` command implements various subcommands, and different options
|
|
depending on the subcommand. With the exception of `clone` and `list`, all
|
|
subcommands expect to be run in an enlistment.
|
|
|
|
COMMANDS
|
|
--------
|
|
|
|
Clone
|
|
~~~~~
|
|
|
|
clone [<options>] <url> [<enlistment>]::
|
|
Clones the specified repository, similar to linkgit:git-clone[1]. By
|
|
default, only commit and tree objects are cloned. Once finished, the
|
|
worktree is located at `<enlistment>/src`.
|
|
+
|
|
The sparse-checkout feature is enabled (except when run with `--full-clone`)
|
|
and the only files present are those in the top-level directory. Use
|
|
`git sparse-checkout set` to expand the set of directories you want to see,
|
|
or `git sparse-checkout disable` to expand to all files (see
|
|
linkgit:git-sparse-checkout[1] for more details). You can explore the
|
|
subdirectories outside your sparse-checkout by using `git ls-tree
|
|
HEAD[:<directory>]`.
|
|
|
|
-b <name>::
|
|
--branch <name>::
|
|
Instead of checking out the branch pointed to by the cloned
|
|
repository's HEAD, check out the `<name>` branch instead.
|
|
|
|
--[no-]full-clone::
|
|
A sparse-checkout is initialized by default. This behavior can be
|
|
turned off via `--full-clone`.
|
|
|
|
List
|
|
~~~~
|
|
|
|
list::
|
|
List enlistments that are currently registered by Scalar. This
|
|
subcommand does not need to be run inside an enlistment.
|
|
|
|
Register
|
|
~~~~~~~~
|
|
|
|
register [<enlistment>]::
|
|
Adds the enlistment's repository to the list of registered repositories
|
|
and starts background maintenance. If `<enlistment>` is not provided,
|
|
then the enlistment associated with the current working directory is
|
|
registered.
|
|
+
|
|
Note: when this subcommand is called in a worktree that is called `src/`, its
|
|
parent directory is considered to be the Scalar enlistment. If the worktree is
|
|
_not_ called `src/`, it itself will be considered to be the Scalar enlistment.
|
|
|
|
Unregister
|
|
~~~~~~~~~~
|
|
|
|
unregister [<enlistment>]::
|
|
Remove the specified repository from the list of repositories
|
|
registered with Scalar and stop the scheduled background maintenance.
|
|
|
|
SEE ALSO
|
|
--------
|
|
linkgit:git-clone[1], linkgit:git-maintenance[1].
|
|
|
|
Scalar
|
|
---
|
|
Associated with the linkgit:git[1] suite
|