]> git.ipfire.org Git - thirdparty/git.git/blobdiff - Documentation/git-clone.txt
Merge branch 'rs/maint-archive-prefix'
[thirdparty/git.git] / Documentation / git-clone.txt
index 2c63a0fbaee0e246538607c8e2f983eb6eafa8e5..aacf4fd327a759951f08762a8da0c748e739b38b 100644 (file)
@@ -12,7 +12,7 @@ SYNOPSIS
 'git clone' [--template=<template_directory>]
          [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]
          [-o <name>] [-u <upload-pack>] [--reference <repository>]
-         [--depth <depth>] [--] <repository> [<directory>]
+         [--depth <depth>] [--recursive] [--] <repository> [<directory>]
 
 DESCRIPTION
 -----------
@@ -84,7 +84,7 @@ its source repository, you can simply run `git repack -a` to copy all
 objects from the source repository into a pack in the cloned repository.
 
 --reference <repository>::
-       If the reference repository is on the local machine
+       If the reference repository is on the local machine,
        automatically setup .git/objects/info/alternates to
        obtain objects from the reference repository.  Using
        an already existing repository as an alternate will
@@ -127,6 +127,13 @@ objects from the source repository into a pack in the cloned repository.
        Instead of using the remote name 'origin' to keep track
        of the upstream repository, use <name>.
 
+--branch <name>::
+-b <name>::
+       Instead of pointing the newly created HEAD to the branch pointed
+       to by the cloned repository's HEAD, point to <name> branch
+       instead. In a non-bare repository, this is the branch that will
+       be checked out.
+
 --upload-pack <upload-pack>::
 -u <upload-pack>::
        When given, and the repository to clone from is accessed
@@ -147,6 +154,14 @@ objects from the source repository into a pack in the cloned repository.
        with a long history, and would want to send in fixes
        as patches.
 
+--recursive::
+       After the clone is created, initialize all submodules within,
+       using their default settings. This is equivalent to running
+       'git submodule update --init --recursive' immediately after
+       the clone is finished. This option is ignored if the cloned
+       repository does not have a worktree/checkout (i.e. if any of
+       `--no-checkout`/`-n`, `--bare`, or `--mirror` is given)
+
 <repository>::
        The (possibly remote) repository to clone from.  See the
        <<URLS,URLS>> section below for more information on specifying