Documentation / git-submodule.txton commit Improve description of git-branch -d and -D in man page. (1e72a40)
   1git-submodule(1)
   2================
   3
   4NAME
   5----
   6git-submodule - Initialize, update or inspect submodules
   7
   8
   9SYNOPSIS
  10--------
  11[verse]
  12'git-submodule' [--quiet] [-b branch] add <repository> [<path>]
  13'git-submodule' [--quiet] [--cached] [status|init|update] [--] [<path>...]
  14
  15
  16COMMANDS
  17--------
  18add::
  19        Add the given repository as a submodule at the given path
  20        to the changeset to be committed next.  In particular, the
  21        repository is cloned at the specified path, added to the
  22        changeset and registered in .gitmodules.   If no path is
  23        specified, the path is deduced from the repository specification.
  24
  25status::
  26        Show the status of the submodules. This will print the SHA-1 of the
  27        currently checked out commit for each submodule, along with the
  28        submodule path and the output of gitlink:git-describe[1] for the
  29        SHA-1. Each SHA-1 will be prefixed with `-` if the submodule is not
  30        initialized and `+` if the currently checked out submodule commit
  31        does not match the SHA-1 found in the index of the containing
  32        repository. This command is the default command for git-submodule.
  33
  34init::
  35        Initialize the submodules, i.e. register in .git/config each submodule
  36        name and url found in .gitmodules. The key used in .git/config is
  37        `submodule.$name.url`. This command does not alter existing information
  38        in .git/config.
  39
  40update::
  41        Update the registered submodules, i.e. clone missing submodules and
  42        checkout the commit specified in the index of the containing repository.
  43        This will make the submodules HEAD be detached.
  44
  45
  46OPTIONS
  47-------
  48-q, --quiet::
  49        Only print error messages.
  50
  51-b, --branch::
  52        Branch of repository to add as submodule.
  53
  54--cached::
  55        Display the SHA-1 stored in the index, not the SHA-1 of the currently
  56        checked out submodule commit. This option is only valid for the
  57        status command.
  58
  59<path>::
  60        Path to submodule(s). When specified this will restrict the command
  61        to only operate on the submodules found at the specified paths.
  62
  63FILES
  64-----
  65When initializing submodules, a .gitmodules file in the top-level directory
  66of the containing repository is used to find the url of each submodule.
  67This file should be formatted in the same way as $GIR_DIR/config. The key
  68to each submodule url is "submodule.$name.url".
  69
  70
  71AUTHOR
  72------
  73Written by Lars Hjemli <hjemli@gmail.com>
  74
  75GIT
  76---
  77Part of the gitlink:git[7] suite