@matheusbsbs / matheus-bagliano / commits / 891dbc6e40
Fork 0

Add gitmodules(5)

This adds documentation for the .gitmodules file. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Lars Hjemli committed Jun 12, 2007 at 09:05 UTC 891dbc6e40b93a2fa5c4af74e2684d40fb1aad4c
2 files changed +63 -1
Documentation/Makefile
+1 -1
@@ -2,7 +2,7 @@ MAN1_TXT= \
2 $(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \
3 $(wildcard git-*.txt)) \
4 gitk.txt
5 -MAN5_TXT=gitattributes.txt gitignore.txt
5 +MAN5_TXT=gitattributes.txt gitignore.txt gitmodules.txt
6 MAN7_TXT=git.txt
7
8 DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT))
Documentation/gitmodules.txt new
+62
@@ -0,0 +1,62 @@
1 +gitmodules(5)
2 +=============
3 +
4 +NAME
5 +----
6 +gitmodules - defining submodule properties
7 +
8 +SYNOPSIS
9 +--------
10 +.gitmodules
11 +
12 +
13 +DESCRIPTION
14 +-----------
15 +
16 +The `.gitmodules` file, located in the top-level directory of a git
17 +working tree, is a text file with a syntax matching the requirements
18 +of gitlink:git-config[1].
19 +
20 +The file contains one subsection per submodule, and the subsection value
21 +is the name of the submodule. Each submodule section also contains the
22 +following required keys:
23 +
24 +submodule.<name>.path::
25 + Defines the path, relative to the top-level directory of the git
26 + working tree, where the submodule is expected to be checked out.
27 + The path name must not end with a `/`. All submodule paths must
28 + be unique within the .gitmodules file.
29 +
30 +submodule.<name>.url::
31 + Defines an url from where the submodule repository can be cloned.
32 +
33 +
34 +EXAMPLES
35 +--------
36 +
37 +Consider the following .gitmodules file:
38 +
39 + [submodule "libfoo"]
40 + path = include/foo
41 + url = git://foo.com/git/lib.git
42 +
43 + [submodule "libbar"]
44 + path = include/bar
45 + url = git://bar.com/git/lib.git
46 +
47 +
48 +This defines two submodules, `libfoo` and `libbar`. These are expected to
49 +be checked out in the paths 'include/foo' and 'include/bar', and for both
50 +submodules an url is specified which can be used for cloning the submodules.
51 +
52 +SEE ALSO
53 +--------
54 +gitlink:git-submodule[1] gitlink:git-config[1]
55 +
56 +DOCUMENTATION
57 +-------------
58 +Documentation by Lars Hjemli <hjemli@gmail.com>
59 +
60 +GIT
61 +---
62 +Part of the gitlink:git[7] suite