doc: make the gitfile syntax easier to discover
Signed-off-by: Marcel Krause <mk+copyleft@pimpmybyte.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Marcel Krause committed
Nov 28, 2023 at 07:55 UTC
e4299d26d4bee3120429d49baa320a406fbfe07c
2 files changed
+5
-1
Documentation/gitrepository-layout.txt
+3
-1
@@ -23,7 +23,9 @@ A Git repository comes in two different flavours:
23
24
*Note*: Also you can have a plain text file `.git` at the root of
25
your working tree, containing `gitdir: <path>` to point at the real
26
-directory that has the repository. This mechanism is often used for
26
+directory that has the repository.
27
+This mechanism is called a 'gitfile' and is usually managed via the
28
+`git submodule` and `git worktree` commands. It is often used for
29
a working tree of a submodule checkout, to allow you in the
30
containing superproject to `git checkout` a branch that does not
31
have the submodule. The `checkout` has to remove the entire
Documentation/glossary-content.txt
+2
@@ -184,6 +184,8 @@ current branch integrates with) obviously do not work, as there is no
184
[[def_gitfile]]gitfile::
185
A plain file `.git` at the root of a working tree that
186
points at the directory that is the real repository.
187
+ For proper use see linkgit:git-worktree[1] or linkgit:git-submodule[1].
188
+ For syntax see linkgit:gitrepository-layout[5].
189
190
[[def_grafts]]grafts::
191
Grafts enables two otherwise different lines of development to be joined