Merge branch 'po/describe-not-necessarily-7'
[gitweb.git] / Documentation / git-submodule.txt
index 2794e2978021c08b613b07aebf36090c7943fe09..0ed5c24dc1ce553d0b0ac90d49fcf161a3320474 100644 (file)
@@ -15,6 +15,7 @@ SYNOPSIS
 'git submodule' [--quiet] init [--] [<path>...]
 'git submodule' [--quiet] deinit [-f|--force] (--all|[--] <path>...)
 'git submodule' [--quiet] update [<options>] [--] [<path>...]
+'git submodule' [--quiet] set-branch [<options>] [--] <path>
 'git submodule' [--quiet] summary [<options>] [--] [<path>...]
 'git submodule' [--quiet] foreach [--recursive] <command>
 'git submodule' [--quiet] sync [--recursive] [--] [<path>...]
@@ -42,7 +43,7 @@ This may be either an absolute URL, or (if it begins with ./
 or ../), the location relative to the superproject's default remote
 repository (Please note that to specify a repository 'foo.git'
 which is located right next to a superproject 'bar.git', you'll
-have to use '../foo.git' instead of './foo.git' - as one might expect
+have to use `../foo.git` instead of `./foo.git` - as one might expect
 when following the rules for relative URLs - because the evaluation
 of relative URLs in Git is identical to that of relative directories).
 +
@@ -172,6 +173,12 @@ submodule with the `--init` option.
 If `--recursive` is specified, this command will recurse into the
 registered submodules, and update any nested submodules within.
 --
+set-branch ((-d|--default)|(-b|--branch <branch>)) [--] <path>::
+       Sets the default remote tracking branch for the submodule. The
+       `--branch` option allows the remote branch to be specified. The
+       `--default` option removes the submodule.<name>.branch configuration
+       key, which causes the tracking branch to default to 'master'.
+
 summary [--cached|--files] [(-n|--summary-limit) <n>] [commit] [--] [<path>...]::
        Show commit summary between the given commit (defaults to HEAD) and
        working tree/index. For a submodule in question, a series of commits
@@ -259,13 +266,14 @@ OPTIONS
        This option is only valid for the deinit command. Unregister all
        submodules in the working tree.
 
--b::
---branch::
+-b <branch>::
+--branch <branch>::
        Branch of repository to add as submodule.
        The name of the branch is recorded as `submodule.<name>.branch` in
        `.gitmodules` for `update --remote`.  A special value of `.` is used to
        indicate that the name of the branch in the submodule should be the
-       same name as the current branch in the current repository.
+       same name as the current branch in the current repository.  If the
+       option is not specified, it defaults to 'master'.
 
 -f::
 --force::