This course will become read-only in the near future. Tell us at if that is a problem.


Cloning a repository enables us to work locally with files that originate on a remote computer. In this task, we will clone a remote repository from Github (a popular software collaboration community).


The clone command takes the URL to a Git repository as an argument:

git clone git://
Initialized empty Git repository in /home/dev/py/lernanta/.git/
remote: Counting objects: 15337, done.
remote: Compressing objects: 100% (4307/4307), done.
remote: Total 15337 (delta 10852), reused 14989 (delta 10554)
Receiving objects: 100% (15337/15337), 7.00 MiB | 134 KiB/s, done.
Resolving deltas: 100% (10852/10852), done.

As you can see, the clone command creates an empty repository and then downloads all 'objects' (files) from the remote repository.


  1. Choose an interesting repository on Github, Gitorious, or another social code website that uses Git.
  2. Clone the repository.
  3. Take a look at the code and post your questions/insights here.

Task Discussion

  • holdenweb   Oct. 13, 2011, 4:24 a.m.

    Note that if students are still in the same drectory they used to create their own repository they will see the message:

    Cloning into lernanta...

    rather than the message you show, which is cloning into an uncontrolled directory.