diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2019-11-21 23:04:34 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-11-22 08:11:43 +0100 |
commit | bab3c3590879c5680060a5d5e2b93b4f97519025 (patch) | |
tree | bab1c9b6e1113f3144dc8772f578f18c573728a0 /Documentation/git-sparse-checkout.txt | |
parent | sparse-checkout: create builtin with 'list' subcommand (diff) | |
download | git-bab3c3590879c5680060a5d5e2b93b4f97519025.tar.xz git-bab3c3590879c5680060a5d5e2b93b4f97519025.zip |
sparse-checkout: create 'init' subcommand
Getting started with a sparse-checkout file can be daunting. Help
users start their sparse enlistment using 'git sparse-checkout init'.
This will set 'core.sparseCheckout=true' in their config, write
an initial set of patterns to the sparse-checkout file, and update
their working directory.
Make sure to use the `extensions.worktreeConfig` setting and write
the sparse checkout config to the worktree-specific config file.
This avoids confusing interactions with other worktrees.
The use of running another process for 'git read-tree' is sub-
optimal. This will be removed in a later change.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-sparse-checkout.txt')
-rw-r--r-- | Documentation/git-sparse-checkout.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Documentation/git-sparse-checkout.txt b/Documentation/git-sparse-checkout.txt index 87ffcbbcb0..491be1345f 100644 --- a/Documentation/git-sparse-checkout.txt +++ b/Documentation/git-sparse-checkout.txt @@ -30,6 +30,17 @@ COMMANDS 'list':: Provide a list of the contents in the sparse-checkout file. +'init':: + Enable the `core.sparseCheckout` setting. If the + sparse-checkout file does not exist, then populate it with + patterns that match every file in the root directory and + no other directories, then will remove all directories tracked + by Git. Add patterns to the sparse-checkout file to + repopulate the working directory. ++ +To avoid interfering with other worktrees, it first enables the +`extensions.worktreeConfig` setting and makes sure to set the +`core.sparseCheckout` setting in the worktree-specific config file. SPARSE CHECKOUT --------------- |