summaryrefslogtreecommitdiff
path: root/Documentation/git-worktree.txt
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2015-07-06 17:30:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-07-06 18:07:43 (GMT)
commita8ba5dd7b18ed3a3276ee23ab66569dbddc50913 (patch)
tree8b19fbeb00984af1352fd44f5c4abc943c11465f /Documentation/git-worktree.txt
parentaf189b4cbec7f6ff4687c8ca78b2455c1f28923c (diff)
downloadgit-a8ba5dd7b18ed3a3276ee23ab66569dbddc50913.zip
git-a8ba5dd7b18ed3a3276ee23ab66569dbddc50913.tar.gz
git-a8ba5dd7b18ed3a3276ee23ab66569dbddc50913.tar.bz2
Documentation/git-worktree: add high-level 'lock' overview
Due to the (current) absence of a "git worktree lock" command, locking a worktree's administrative files to prevent automatic pruning is a manual task, necessarily requiring low-level understanding of linked worktree functionality. However, this level of detail does not belong in the high-level DESCRIPTION section, so add a generalized discussion of locking to DESCRIPTION and move the technical information to DETAILS. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-worktree.txt')
-rw-r--r--Documentation/git-worktree.txt24
1 files changed, 15 insertions, 9 deletions
diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index 2954dc6..0385e9a 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -37,15 +37,11 @@ at least one git command inside the linked working directory
(e.g. `git status`) in order to update its administrative files in the
repository so that they do not get automatically pruned.
-To prevent a $GIT_DIR/worktrees entry from from being pruned (which
-can be useful in some situations, such as when the
-entry's working tree is stored on a portable device), add a file named
-'locked' to the entry's directory. The file contains the reason in
-plain text. For example, if a linked working tree's `.git` file points
-to `/path/main/.git/worktrees/test-next` then a file named
-`/path/main/.git/worktrees/test-next/locked` will prevent the
-`test-next` entry from being pruned. See
-linkgit:gitrepository-layout[5] for details.
+If a linked working tree is stored on a portable device or network share
+which is not always mounted, you can prevent its administrative files from
+being pruned by creating a file named 'lock' alongside the other
+administrative files, optionally containing a plain text reason that
+pruning should be suppressed. See section "DETAILS" for more information.
COMMANDS
--------
@@ -99,6 +95,16 @@ thumb is do not make any assumption about whether a path belongs to
$GIT_DIR or $GIT_COMMON_DIR when you need to directly access something
inside $GIT_DIR. Use `git rev-parse --git-path` to get the final path.
+To prevent a $GIT_DIR/worktrees entry from from being pruned (which
+can be useful in some situations, such as when the
+entry's working tree is stored on a portable device), add a file named
+'locked' to the entry's directory. The file contains the reason in
+plain text. For example, if a linked working tree's `.git` file points
+to `/path/main/.git/worktrees/test-next` then a file named
+`/path/main/.git/worktrees/test-next/locked` will prevent the
+`test-next` entry from being pruned. See
+linkgit:gitrepository-layout[5] for details.
+
BUGS
----
Multiple checkout support for submodules is incomplete. It is NOT