Skip to content

Commit e4299d2

Browse files
Marcel Krausegitster
authored andcommitted
doc: make the gitfile syntax easier to discover
Signed-off-by: Marcel Krause <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 61a22dd commit e4299d2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Documentation/gitrepository-layout.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ A Git repository comes in two different flavours:
2323

2424
*Note*: Also you can have a plain text file `.git` at the root of
2525
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
2729
a working tree of a submodule checkout, to allow you in the
2830
containing superproject to `git checkout` a branch that does not
2931
have the submodule. The `checkout` has to remove the entire

Documentation/glossary-content.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ current branch integrates with) obviously do not work, as there is no
184184
[[def_gitfile]]gitfile::
185185
A plain file `.git` at the root of a working tree that
186186
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].
187189

188190
[[def_grafts]]grafts::
189191
Grafts enables two otherwise different lines of development to be joined

0 commit comments

Comments
 (0)