aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-02-09 12:09:10 -0800
committerJunio C Hamano <gitster@pobox.com>2026-02-09 12:09:10 -0800
commit4f3929275b6ce975f80e00a2decfc4ab734a8ead (patch)
treea6c4bd27e8880c2eeb04d228e3815d9d24ff927f /Documentation
parent6176ee2349ae9b4c54948e86fb8de4b9fd4f0c94 (diff)
parent6f5ca70580444e61231ad33de0aac81d2420d523 (diff)
downloadgit-4f3929275b6ce975f80e00a2decfc4ab734a8ead.tar.xz
Merge branch 'sb/doc-worktree-prune-expire-improvement'
The help text and the documentation for the "--expire" option of "git worktree [list|prune]" have been improved. * sb/doc-worktree-prune-expire-improvement: worktree: clarify that --expire only affects missing worktrees
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-worktree.adoc10
1 files changed, 8 insertions, 2 deletions
diff --git a/Documentation/git-worktree.adoc b/Documentation/git-worktree.adoc
index d74ad7b0e9..fbf8426cd9 100644
--- a/Documentation/git-worktree.adoc
+++ b/Documentation/git-worktree.adoc
@@ -131,7 +131,13 @@ with linked worktrees if you move the main worktree manually.)
`prune`::
-Prune worktree information in `$GIT_DIR/worktrees`.
+Remove worktree information in `$GIT_DIR/worktrees` for worktrees
+whose working trees are missing. Useful after manually removing
+a working tree that is no longer needed (but use "git worktree
+remove" next time you want to do so). Also, if you _moved_ a
+working tree elsewhere causing the worktree information to become
+dangling, see "git worktree repair" to reconnect the worktree to
+the new working tree location.
`remove`::
@@ -271,7 +277,7 @@ mismatch, even if the links are correct.
With `list`, output additional information about worktrees (see below).
`--expire <time>`::
- With `prune`, only expire unused worktrees older than _<time>_.
+ With `prune`, only prune missing worktrees if older than _<time>_.
+
With `list`, annotate missing worktrees as prunable if they are older than
_<time>_.