Repository navigation
-
A
.worktreekeepin a subdirectory keeps paths at and below that directory, its patterns matched
relative to it as Git reads a nested.gitignore.discard-cache,sweepandfinish --discard-cache --archivekeep what it names,archiveimages it, andprune-archives --strip-build-outputnever strips it. It keeps nothing outside its own directory, is never
deleted itself, and one that is a symbolic link, a directory or unreadable refuses as
keep-file-invalidlike the root file. -
A nested
.worktreekeeponly adds keeps: its!lines are ignored, so it cannot un-keep what the
root file or its own other lines keep, and a nested file keeps a path the root file negates. The
.gitignoreof a directory that holds a nested.worktreekeepis kept with it bydiscard-cache,
sweep,finish --discard-cacheand the strip, so a tool's self-ignoring directory still hides
what the keep file keeps.