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

[PATCH 2/3] Add gitmodules(5)

From
LHLars Hjemli <hjemli@gmail.com>
Date
Jun 9, 2007, 21:38 UTC
Message-ID
<11814251322779-git-send-email-hjemli@gmail.com>
In-Reply-To
<1181425132239-git-send-email-hjemli@gmail.com>
This adds documentation for the .gitmodules file.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
---
 Documentation/Makefile       |    2 +-
 Documentation/gitmodules.txt |   63 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 64 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..37888c9
--- /dev/null
+++ b/Documentation/gitmodules.txt
@@ -0,0 +1,63 @@
+gitmodules(5)
+=============
+
+NAME
+----
+gitmodules - defining submodule properties
+
+SYNOPSIS
+--------
+.gitmodules
+
+
+DESCRIPTION
+-----------
+
+The `.gitmodules` file, located in the top-level directory of a
+gitlink:git[7] working tree, is a text file with a layout matching the
+requirements of gitlink:git-config[1].
+
+The file consists of sections named `module`, divided into one subsection
+per submodule. The subsections are named with the logical name of the
+submodule it describes.
+
+Each submodule can contain the following keys.
+
+module.$name.path::
+	Define a path, relative to the top-level directory of the git
+	working tree, where the submodule is expected to be checked out.
+
+module.$name.url::
+	Define a url from where the submodule repository can be cloned.
+
+
+EXAMPLES
+--------
+
+Consider the following .gitmodules file:
+
+	[module 'libfoo']
+		path = include/foo
+		url = git://example1.com/git/libfoo.git
+
+	[module 'libbar']
+		url = git://example2.com/pub/git/libbar.git
+
+
+This defines two submodules, `libfoo` and `libbar`. The former specifies
+both a checkout path and a suggested url, while the latter only specifies
+a url. This file would make gitlink:git-submodule[1] map the path
+`include/foo` to the submodule `libfoo` and the path `libbar` to the
+submodule `libbar`.
+
+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: Lars HjemliNext: Frank Lichtenheld
Message 8 of 29 in “submodule improvements”
  1. 0/3 submodule improvementsLars Hjemli, Jun 9, 2007
  2. 1/3 git-submodule: allow submodule name and path to differLars Hjemli, Jun 9, 2007
  3. Junio C HamanoJun 10, 2007
  4. Johannes SchindelinJun 10, 2007
  5. Junio C HamanoJun 10, 2007
  6. Lars HjemliJun 10, 2007
  7. Lars HjemliJun 10, 2007
  8. 2/3 Add gitmodules(5)Lars Hjemli, Jun 9, 2007
  9. Frank LichtenheldJun 10, 2007
  10. Lars HjemliJun 10, 2007
  11. Johannes SchindelinJun 10, 2007
  12. Lars HjemliJun 10, 2007
  13. Sven VerdoolaegeJun 10, 2007
  14. Lars HjemliJun 10, 2007
  15. Sven VerdoolaegeJun 10, 2007
  16. Lars HjemliJun 10, 2007
  17. Junio C HamanoJun 10, 2007
  18. Lars HjemliJun 10, 2007
  19. Sven VerdoolaegeJun 11, 2007
  20. Lars HjemliJun 11, 2007
  21. Sven VerdoolaegeJun 11, 2007
  22. Junio C HamanoJun 11, 2007
  23. Matthias LederhoferJun 13, 2007
  24. Lars HjemliJun 13, 2007
  25. Matthias LederhoferJun 13, 2007
  26. Lars HjemliJun 13, 2007
  27. Junio C HamanoJun 13, 2007
  28. gitmodules(5): remove leading period from synopsisLars Hjemli, Jun 13, 2007
  29. 3/3 t7400: barf if git-submodule removes or replaces a fileLars Hjemli, Jun 9, 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.