]>
Commit | Line | Data |
---|---|---|
215a7ad1 JH |
1 | git-clone(1) |
2 | ============ | |
6ec311da JH |
3 | |
4 | NAME | |
5 | ---- | |
215a7ad1 | 6 | git-clone - Clones a repository. |
6ec311da JH |
7 | |
8 | ||
9 | SYNOPSIS | |
10 | -------- | |
cc1621e2 | 11 | 'git-clone' [-l [-s]] [-q] [-n] [-u <upload-pack>] <repository> <directory> |
6ec311da JH |
12 | |
13 | DESCRIPTION | |
14 | ----------- | |
15 | Clones a repository into a newly created directory. | |
16 | ||
17 | OPTIONS | |
18 | ------- | |
a2775c2a | 19 | --local:: |
6ec311da JH |
20 | -l:: |
21 | When the repository to clone from is on a local machine, | |
22 | this flag bypasses normal "git aware" transport | |
23 | mechanism and clones the repository by making a copy of | |
24 | HEAD and everything under objects and refs directories. | |
25 | The files under .git/objects/ directory are hardlinked | |
26 | to save space when possible. | |
27 | ||
a2775c2a EB |
28 | --shared:: |
29 | -s:: | |
30 | When the repository to clone is on the local machine, | |
31 | instead of using hard links automatically setup | |
32 | .git/objects/info/alternatives to share the objects | |
33 | with the source repository | |
34 | ||
35 | --quiet:: | |
6ec311da JH |
36 | -q:: |
37 | Operate quietly. This flag is passed to "rsync" and | |
38 | "git-clone-pack" commands when given. | |
39 | ||
a2775c2a EB |
40 | -n:: |
41 | No checkout of HEAD is performed after the clone is complete. | |
42 | ||
43 | --upload-pack <upload-pack>:: | |
6ec311da JH |
44 | -u <upload-pack>:: |
45 | When given, and the repository to clone from is handled | |
46 | by 'git-clone-pack', '--exec=<upload-pack>' is passed to | |
47 | the command to specify non-default path for the command | |
48 | run on the other end. | |
49 | ||
50 | <repository>:: | |
51 | The (possibly remote) repository to clone from. It can | |
52 | be an "rsync://host/dir" URL, an "http://host/dir" URL, | |
53 | or [<host>:]/dir notation that is used by 'git-clone-pack'. | |
54 | Currently http transport is not supported. | |
55 | ||
56 | <directory>:: | |
57 | The name of a new directory to be cloned into. It is an | |
58 | error to specify an existing directory. | |
59 | ||
60 | Author | |
61 | ------ | |
62 | Written by Linus Torvalds <torvalds@osdl.org> | |
63 | ||
64 | Documentation | |
65 | -------------- | |
66 | Documentation by Junio C Hamano. | |
67 | ||
68 | ||
69 | GIT | |
70 | --- | |
a7154e91 | 71 | Part of the gitlink:git[7] suite |
6ec311da | 72 |