aboutsummaryrefslogtreecommitdiff
path: root/Documentation/git-submodule.txt
diff options
context:
space:
mode:
authorSven Verdoolaege <skimo@kotnet.org>2007-06-24 23:06:07 +0200
committerJunio C Hamano <gitster@pobox.com>2007-07-02 01:33:44 -0700
commitecda072380e54084d5160d7b6a9cdb23369da804 (patch)
treef3e53973fa7da202eff7a2019149900e8701ba3c /Documentation/git-submodule.txt
parent444649e5a833c6ed24e0e92364923324d9ffb386 (diff)
downloadgit-ecda072380e54084d5160d7b6a9cdb23369da804.tar.gz
git-ecda072380e54084d5160d7b6a9cdb23369da804.tar.xz
git-submodule: provide easy way of adding new submodules
To make a submodule effectively usable, the path and a URL where the submodule can be cloned need to be stored in .gitmodules. This subcommand takes care of setting this information after cloning the new submodule. Only the index is updated, so, if needed, the user may still change the URL or switch to a different branch of the submodule before committing. Signed-off-by: Sven Verdoolaege <skimo@kotnet.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-submodule.txt')
-rw-r--r--Documentation/git-submodule.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index f8fb80f18..7f0904e29 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -8,11 +8,19 @@ git-submodule - Initialize, update or inspect submodules
SYNOPSIS
--------
+'git-submodule' [--quiet] [-b branch] add <repository> [<path>]
'git-submodule' [--quiet] [--cached] [status|init|update] [--] [<path>...]
COMMANDS
--------
+add::
+ Add the given repository as a submodule at the given path
+ to the changeset to be committed next. In particular, the
+ repository is cloned at the specified path, added to the
+ changeset and registered in .gitmodules. If no path is
+ specified, the path is deduced from the repository specification.
+
status::
Show the status of the submodules. This will print the SHA-1 of the
currently checked out commit for each submodule, along with the
@@ -39,6 +47,9 @@ OPTIONS
-q, --quiet::
Only print error messages.
+-b, --branch::
+ Branch of repository to add as submodule.
+
--cached::
Display the SHA-1 stored in the index, not the SHA-1 of the currently
checked out submodule commit. This option is only valid for the