Code

Move split_cmdline() to alias.c
[git.git] / Documentation / git-submodule.txt
index e96bf365213c3321e9721dc2baa87ad278dfcb26..441ae1483bf57aca849c0470c6e19e963c9ebf19 100644 (file)
@@ -11,7 +11,8 @@ SYNOPSIS
 [verse]
 'git-submodule' [--quiet] add [-b branch] [--] <repository> [<path>]
 'git-submodule' [--quiet] status [--cached] [--] [<path>...]
-'git-submodule' [--quiet] [init|update] [--] [<path>...]
+'git-submodule' [--quiet] init [--] [<path>...]
+'git-submodule' [--quiet] update [--init] [--] [<path>...]
 'git-submodule' [--quiet] summary [--summary-limit <n>] [commit] [--] [<path>...]
 
 
@@ -19,8 +20,9 @@ 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
+       to the changeset to be committed next.  If path is a valid
+       repository within the project, it is added as is. Otherwise,
+       repository is cloned at the specified path. path is added to the
        changeset and registered in .gitmodules.   If no path is
        specified, the path is deduced from the repository specification.
        If the repository url begins with ./ or ../, it is stored as
@@ -46,6 +48,10 @@ update::
        Update the registered submodules, i.e. clone missing submodules and
        checkout the commit specified in the index of the containing repository.
        This will make the submodules HEAD be detached.
++
+If the submodule is not yet initialized, and you just want to use the
+setting as stored in .gitmodules, you can automatically initialize the
+submodule with the --init option.
 
 summary::
        Show commit summary between the given commit (defaults to HEAD) and
@@ -55,10 +61,12 @@ summary::
 
 OPTIONS
 -------
--q, --quiet::
+-q::
+--quiet::
        Only print error messages.
 
--b, --branch::
+-b::
+--branch::
        Branch of repository to add as submodule.
 
 --cached::
@@ -66,10 +74,11 @@ OPTIONS
        commands typically use the commit found in the submodule HEAD, but
        with this option, the commit stored in the index is used instead.
 
--n, --summary-limit::
+-n::
+--summary-limit::
        This option is only valid for the summary command.
        Limit the summary size (number of commits shown in total).
-       Giving 0 will disable the summary; a negative number means unlimted
+       Giving 0 will disable the summary; a negative number means unlimited
        (the default). This limit only applies to modified submodules. The
        size is always limited to 1 for added/deleted/typechanged submodules.
 
@@ -92,4 +101,4 @@ Written by Lars Hjemli <hjemli@gmail.com>
 
 GIT
 ---
-Part of the linkgit:git[7] suite
+Part of the linkgit:git[1] suite