We have all ready a repository. Other developer Ken wants to join our project and give code support. How can we do that with with Git. Git have clone mechanism to copy existing repository easily.
$ git clone /home/john/myproject/ .
Cloning into '.'...
As we see we have cloned it with clone command.
/home/john/myproject/ is the path where existing repository resides.
. is the the path where we want to clone. If we omit
. by default current working path is the destination directory.
New Target Directory Name
We can give new directory name while cloning repository.
$ git clone /home/john/myproject/ yourproject
Cloning into 'yourproject'...
/home/john/myprojectis our source directory
youprojectis new directory name
Clone Protocol Suport
We have clone local path git repositories but what happens if we try to clone http hosted project. Nothing it just clones the project. Git support http, https, ssh, git protocols as transmission protocol.
Traditional version control systems uses centralized servers to make system concurrent. Git is different from them. Repositories are complete cloned to the new developers.