Git - Clone Operation
We have a bare repository on Git server and Tom also pushed his first version. Now, Jerry can view his changes. Clone operation creates instance of the remote repository.
Jerry creates new directory in his home directory and performs clone operation.
[jerry@CentOS ~]$ mkdir jerry_repo [jerry@CentOS ~]$ cd jerry_repo/ [jerry@CentOS jerry_repo]$ git clone firstname.lastname@example.org:project.git
Above command will produce the following result.
Initialized empty Git repository in /home/jerry/jerry_repo/project/.git/ remote: Counting objects: 3, done. Receiving objects: 100% (3/3), 241 bytes, done. remote: Total 3 (delta 0), reused 0 (delta 0)
Jerry changes directory to new local repository and lists directory contents.
[jerry@CentOS jerry_repo]$ cd project/ [jerry@CentOS jerry_repo]$ ls README