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