ezekiel
ezekiel

Reputation: 524

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?

Upvotes: 1

Views: 123

Answers (2)

phd
phd

Reputation: 94931

Clone the branch ssd instead of master:

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

Upvotes: 1

pcampana
pcampana

Reputation: 2701

You problem is that when you do a git clone by default you are in the master branch. You want to switch to ssd branch. To do it:

git checkout ssd

And then you will see files of this branch. You can check wich branch are you using wit the following command:

git branch

Upvotes: 1

Related Questions