Git: Clone a Project
Clone a project means making a copy of an existing code base.
git clone url
- The url can be a local directory that contains a subdir named
.git
. - It creates dir in current dir.
- The new dir has the same name as cloned project name.
# get a copy of git source code git clone git://git.kernel.org/pub/scm/git/git.git
# get a copy of the xah fly keys source code git clone https://github.com/xahlee/xah-fly-keys
Clone without history
# clone a project without history git clone --depth 1 https://github.com/xahlee/xah-fly-keys