git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Baudis <pasky@suse.cz>
To: gitster@pobox.com
Cc: git@vger.kernel.org, Heikki Orsila <shdl@zakalwe.fi>
Subject: [PATCHv2] Documentation/git-submodule.txt: Add Description section
Date: Wed, 16 Jul 2008 20:44:12 +0200	[thread overview]
Message-ID: <20080716184248.6524.38463.stgit@localhost> (raw)
In-Reply-To: <20080715183705.GD4379@zakalwe.fi>

Figuring out how submodules work conceptually is quite a bumpy
ride for a newcomer; the user manual helps (if one knows to actually
look into it), but the reference documentation should provide good
quick intro as well. This patch attempts to do that, with suggestions
from Heikki Orsila.

Cc: Heikki Orsila <shdl@zakalwe.fi>
Signed-off-by: Petr Baudis <pasky@suse.cz>
---

I have adjusted the description a bit; however, I believe mentioning remotes in
the description would only raise the danger of confusion - I emphasized the
level of separation, though.

 Documentation/git-submodule.txt |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index 76702a0..87c4ece 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -16,6 +16,28 @@ SYNOPSIS
 'git submodule' [--quiet] summary [--summary-limit <n>] [commit] [--] [<path>...]
 
 
+DESCRIPTION
+-----------
+Submodules are a special kind of tree entries which refer to a particular tree
+in another repository (living at a given URL).  The tree entry describes
+the existence of a submodule with the given name and the exact revision that
+should be used, while the location of the repository is described in the
+`/.gitmodules` file.
+
+When checked out, submodules will maintain their own independent repositories
+within their directories; the only link between the submodule and the "parent
+project" is the tree entry within the parent project mentioned above.
+
+This command will manage the tree entries and contents of the gitmodules file
+for you, as well as inspecting the status of your submodules and updating them.
+When adding a new submodule to the tree, the 'add' subcommand is to be used.
+However, when pulling a tree containing submodules, these will not be checked
+out by default; the 'init' and 'update' subcommands will maintain submodules
+checked out and at appropriate revision in your working tree. You can inspect
+the current status of your submodules using the 'submodule' subcommand and get
+an overview of changes 'update' would perform using the 'summary' subcommand.
+
+
 COMMANDS
 --------
 add::

  reply	other threads:[~2008-07-16 18:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-15 10:22 [PATCH] Documentation/git-submodule.txt: Add Description section Petr Baudis
2008-07-15 14:06 ` Junio C Hamano
2008-07-15 18:37 ` Heikki Orsila
2008-07-16 18:44   ` Petr Baudis [this message]
2008-07-16 19:15     ` [PATCHv2] " Kalle Olavi Niemitalo
2008-07-16 19:29     ` Junio C Hamano
2008-07-17 12:18       ` Petr Baudis
2008-07-17 12:29         ` [PATCH] Documentation/git-submodule.txt: Further clarify the description Petr Baudis
2008-07-17 13:37           ` Heikki Orsila
2008-07-17 20:24           ` Junio C Hamano
2008-07-18 13:36             ` Petr Baudis
2008-07-18 13:40               ` Petr Baudis
2008-07-17 10:41     ` [PATCHv2] Documentation/git-submodule.txt: Add Description section Heikki Orsila

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080716184248.6524.38463.stgit@localhost \
    --to=pasky@suse.cz \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=shdl@zakalwe.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).