September 2009
Beginner
942 pages
85h 34m
English
clone
git clonerepository[local-directory]
Make a copy of repository (which can be a local or remote Git repository) in local-directory. By default, if repository is on the local filesystem, Git will use hardlinks to copy the .git/objects folder to minimize disk space waste.
Available forms for repository are:
| /path/repo.git |
| rsync://hostname/path/repo.git |
| http://hostname/path/repo.git |
| https://hostname/path/repo.git |
| git://host/path/repo.git |
| ssh://host/path/repo.git |
| ssh://user@host:port/path/repo.git |
| host:path/repo.git |
| user@host:path/repo.git |
| -s, --shared |
| --no-hardlinks |
| --reference other-parent-repository |
| -q, --quiet |
| -n, --no-checkout |
| --bare |
| -o origin-name, --origin origin-name |
| --depth shallow-clone-depth |
To clone the Linux kernel repository:
$git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git linux-2.6