1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
\r
4 <article lang="en" id="gitmodules(5)">
\r
6 <title>gitmodules(5)</title>
\r
8 <primary>gitmodules(5)</primary>
\r
11 <simplesect id="_name">
\r
13 <simpara>gitmodules - defining submodule properties</simpara>
\r
15 <simplesect id="_synopsis">
\r
16 <title>SYNOPSIS</title>
\r
17 <simpara>$GIT_WORK_DIR/.gitmodules</simpara>
\r
19 <simplesect id="_description">
\r
20 <title>DESCRIPTION</title>
\r
21 <simpara>The <literal>.gitmodules</literal> file, located in the top-level directory of a git
\r
22 working tree, is a text file with a syntax matching the requirements
\r
23 of <xref linkend="git-config(1)"/>.</simpara>
\r
24 <simpara>The file contains one subsection per submodule, and the subsection value
\r
25 is the name of the submodule. Each submodule section also contains the
\r
26 following required keys:</simpara>
\r
30 submodule.<name>.path
\r
34 Defines the path, relative to the top-level directory of the git
\r
35 working tree, where the submodule is expected to be checked out.
\r
36 The path name must not end with a <literal>/</literal>. All submodule paths must
\r
37 be unique within the .gitmodules file.
\r
43 submodule.<name>.url
\r
47 Defines an url from where the submodule repository can be cloned.
\r
53 <simplesect id="_examples">
\r
54 <title>EXAMPLES</title>
\r
55 <simpara>Consider the following .gitmodules file:</simpara>
\r
56 <literallayout class="monospaced">[submodule "libfoo"]
\r
58 url = git://foo.com/git/lib.git</literallayout>
\r
59 <literallayout class="monospaced">[submodule "libbar"]
\r
61 url = git://bar.com/git/lib.git</literallayout>
\r
62 <simpara>This defines two submodules, <literal>libfoo</literal> and <literal>libbar</literal>. These are expected to
\r
63 be checked out in the paths <emphasis>include/foo</emphasis> and <emphasis>include/bar</emphasis>, and for both
\r
64 submodules an url is specified which can be used for cloning the submodules.</simpara>
\r
66 <simplesect id="_see_also">
\r
67 <title>SEE ALSO</title>
\r
68 <simpara><xref linkend="git-submodule(1)"/> <xref linkend="git-config(1)"/></simpara>
\r
70 <simplesect id="_documentation">
\r
71 <title>DOCUMENTATION</title>
\r
72 <simpara>Documentation by Lars Hjemli <<ulink url="mailto:hjemli@gmail.com">hjemli@gmail.com</ulink>></simpara>
\r
74 <simplesect id="_git">
\r
76 <simpara>Part of the <xref linkend="git(1)"/> suite</simpara>
\r