Autogenerated man pages for v1.2.4-gf61c2
[git.git] / man1 / git-clone.1
index 4966bab..fb56e48 100755 (executable)
 ..
 .TH "GIT-CLONE" 1 "" "" ""
 .SH NAME
-git-clone \- Clones a repository.
+git-clone \- Clones a repository
 .SH "SYNOPSIS"
 
-
-git\-clone [\-l [\-s]] [\-q] [\-n] [\-o <name>] [\-u <upload\-pack>] <repository> [<directory>]
+.nf
+\fIgit\-clone\fR [\-l [\-s]] [\-q] [\-n] [\-\-bare] [\-o <name>] [\-u <upload\-pack>]
+          <repository> [<directory>]
+.fi
 
 .SH "DESCRIPTION"
 
@@ -43,15 +45,15 @@ This is to help the typical workflow of working off of the remote master branch\
 .SH "OPTIONS"
 
 .TP
-\-\-local, \-l
+\-\-local, \-l
 When the repository to clone from is on a local machine, this flag bypasses normal "git aware" transport mechanism and clones the repository by making a copy of HEAD and everything under objects and refs directories\&. The files under \&.git/objects/ directory are hardlinked to save space when possible\&.
 
 .TP
-\-\-shared, \-s
+\-\-shared, \-s
 When the repository to clone is on the local machine, instead of using hard links, automatically setup \&.git/objects/info/alternatives to share the objects with the source repository\&. The resulting repository starts out without any object of its own\&.
 
 .TP
-\-\-quiet, \-q
+\-\-quiet, \-q
 Operate quietly\&. This flag is passed to "rsync" and "git\-clone\-pack" commands when given\&.
 
 .TP
@@ -59,12 +61,16 @@ Operate quietly\&. This flag is passed to "rsync" and "git\-clone\-pack" command
 No checkout of HEAD is performed after the clone is complete\&.
 
 .TP
+\-\-bare
+Make a \fIbare\fR GIT repository\&. That is, instead of creating <directory> and placing the administrative files in <directory>/\&.git, make the <directory> itself the $GIT_DIR\&. This implies \-n option\&. When this option is used, neither the origin branch nor the default remotes/origin file is created\&.
+
+.TP
 \-o <name>
-Instead of using the branch name origin to keep track of the upstream repository, use <name> instead\&. Note that the shorthand name stored in remotes/origin is not affected, but the local branch name to pull the remote master branch into is\&.
+Instead of using the branch name \fIorigin\fR to keep track of the upstream repository, use <name> instead\&. Note that the shorthand name stored in remotes/origin is not affected, but the local branch name to pull the remote master branch into is\&.
 
 .TP
-\-\-upload\-pack <upload\-pack>, \-u <upload\-pack>
-When given, and the repository to clone from is handled by git\-clone\-pack, \-\-exec=<upload\-pack> is passed to the command to specify non\-default path for the command run on the other end\&.
+\-\-upload\-pack <upload\-pack>, \-u <upload\-pack>
+When given, and the repository to clone from is handled by \fIgit\-clone\-pack\fR, \fI\-\-exec=<upload\-pack>\fR is passed to the command to specify non\-default path for the command run on the other end\&.
 
 .TP
 <repository>
@@ -79,17 +85,36 @@ The name of a new directory to clone into\&. The "humanish" part of the source r
 .TP
 Clone from upstream
 
-.IP
+.nf
 $ git clone git://git\&.kernel\&.org/pub/scm/\&.\&.\&./linux\-2\&.6 my2\&.6
 $ cd my2\&.6
 $ make
+.fi
+
 .TP
 Make a local clone that borrows from the current directory, without checking things out
 
-.IP
+.nf
 $ git clone \-l \-s \-n \&. \&.\&./copy
 $ cd copy
 $ git show\-branch
+.fi
+
+.TP
+Create a bare repository to publish your changes to the public
+
+.nf
+$ git clone \-\-bare \-l /home/proj/\&.git /pub/scm/proj\&.git
+.fi
+
+.TP
+Create a repository on the kernel\&.org machine that borrows from Linus
+
+.nf
+$ git clone \-\-bare \-l \-s /pub/scm/\&.\&.\&./torvalds/linux\-2\&.6\&.git \\
+    /pub/scm/\&.\&.\&./me/subsys\-2\&.6\&.git
+.fi
+
 .SH "AUTHOR"