Search code examples
gitgit-clone

Faithfully clone a github repository


I am trying to clone the Caffe SSD implementation: https://github.com/weiliu89/caffe/tree/ssd

So I run:

$ git clone https://github.com/weiliu89/caffe.git
$ ls caffe

and get the expected output, a list of the top level files, as seen on the github web interface.

but if I explore deeper, e.g.:

$ ls caffe/docker/
cpu   gpu   README.md

I get different files/folders to those appearing on the web interface (https://github.com/weiliu89/caffe/tree/ssd/docker).

How can I fix this?


Solution

  • Clone the branch ssd instead of master:

    git clone -b ssd https://github.com/weiliu89/caffe.git