git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 5/5] Add gitmodules(5)

From
LHLars Hjemli <hjemli@gmail.com>
Date
Jun 12, 2007, 07:05 UTC
Message-ID
<11816319211097-git-send-email-hjemli@gmail.com>
In-Reply-To
<20070611225918.GD4323@planck.djpig.de>
This adds documentation for the .gitmodules file.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
---
On 6/12/07, Frank Lichtenheld <frank@lichtenheld.de> wrote:
Show 13 quoted lines
> On Mon, Jun 11, 2007 at 09:12:25PM +0200, Lars Hjemli wrote:
> > +Consider the following .gitmodules file:
> > +
> > +     [submodule 'libfoo']
> > +             path = include/foo
> > +             url = git://foo.com/git/lib.git
> > +
> > +     [submodule 'libbar']
> > +             path = include/bar
> > +             url = git://bar.com/git/lib.git
> > +
> 
> Still the wrong quotes.
Thanks for noticing
 Documentation/Makefile       |    2 +-
 Documentation/gitmodules.txt |   62 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+), 1 deletions(-)
 create mode 100644 Documentation/gitmodules.txt
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 9cef480..2ad18e0 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -2,7 +2,7 @@ MAN1_TXT= \
 	$(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \
 		$(wildcard git-*.txt)) \
 	gitk.txt
-MAN5_TXT=gitattributes.txt gitignore.txt
+MAN5_TXT=gitattributes.txt gitignore.txt gitmodules.txt
 MAN7_TXT=git.txt
 
 DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT))
diff --git a/Documentation/gitmodules.txt b/Documentation/gitmodules.txt
new file mode 100644
index 0000000..6c7d9bf
--- /dev/null
+++ b/Documentation/gitmodules.txt
@@ -0,0 +1,62 @@
+gitmodules(5)
+=============
+
+NAME
+----
+gitmodules - defining submodule properties
+
+SYNOPSIS
+--------
+.gitmodules
+
+
+DESCRIPTION
+-----------
+
+The `.gitmodules` file, located in the top-level directory of a git
+working tree, is a text file with a syntax matching the requirements
+of gitlink:git-config[1].
+
+The file contains one subsection per submodule, and the subsection value
+is the name of the submodule. Each submodule section also contains the
+following required keys:
+
+submodule.<name>.path::
+	Defines the path, relative to the top-level directory of the git
+	working tree, where the submodule is expected to be checked out.
+	The path name must not end with a `/`. All submodule paths must
+	be unique within the .gitmodules file.
+
+submodule.<name>.url::
+	Defines an url from where the submodule repository can be cloned.
+
+
+EXAMPLES
+--------
+
+Consider the following .gitmodules file:
+
+	[submodule "libfoo"]
+		path = include/foo
+		url = git://foo.com/git/lib.git
+
+	[submodule "libbar"]
+		path = include/bar
+		url = git://bar.com/git/lib.git
+
+
+This defines two submodules, `libfoo` and `libbar`. These are expected to
+be checked out in the paths 'include/foo' and 'include/bar', and for both
+submodules an url is specified which can be used for cloning the submodules.
+
+SEE ALSO
+--------
+gitlink:git-submodule[1] gitlink:git-config[1]
+
+DOCUMENTATION
+-------------
+Documentation by Lars Hjemli <hjemli@gmail.com>
+
+GIT
+---
+Part of the gitlink:git[7] suite
-- 
1.5.2.1.914.gbd3a7
Previous: Frank LichtenheldNext: Sven Verdoolaege
Message 8 of 28 in “misc. submodule related changes”
  1. 0/5 misc. submodule related changesLars Hjemli, Jun 11, 2007
  2. 1/5 t7400: barf if git-submodule removes or replaces a fileLars Hjemli, Jun 11, 2007
  3. 2/5 git-submodule: remember to checkout after cloneLars Hjemli, Jun 11, 2007
  4. 3/5 Rename sections from "module" to "submodule" in .gitmodulesLars Hjemli, Jun 11, 2007
  5. 4/5 git-submodule: give submodules proper namesLars Hjemli, Jun 11, 2007
  6. 5/5 Add gitmodules(5)Lars Hjemli, Jun 11, 2007
  7. Frank LichtenheldJun 11, 2007
  8. 5/5 Add gitmodules(5)Lars Hjemli, Jun 12, 2007
  9. Sven VerdoolaegeJun 12, 2007
  10. Lars HjemliJun 12, 2007
  11. Josef WeidendorferJun 12, 2007
  12. Lars HjemliJun 12, 2007
  13. Josef WeidendorferJun 12, 2007
  14. Sven VerdoolaegeJun 12, 2007
  15. Lars HjemliJun 12, 2007
  16. Johannes SixtJun 12, 2007
  17. Johannes SixtJun 12, 2007
  18. Junio C HamanoJun 12, 2007
  19. Sven VerdoolaegeJun 12, 2007
  20. Josef WeidendorferJun 12, 2007
  21. 5/5 Add gitmodules(5)Lars Hjemli, Jun 12, 2007
  22. Johannes SixtJun 12, 2007
  23. Lars HjemliJun 12, 2007
  24. Josef WeidendorferJun 12, 2007
  25. Lars HjemliJun 12, 2007
  26. Johannes SixtJun 12, 2007
  27. Josef WeidendorferJun 12, 2007
  28. Josef WeidendorferJun 12, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.