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?
git git-clone
add a comment |
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?
git git-clone
3
That is what I see in the web interface: github.com/weiliu89/caffe/tree/master/docker. Are you sure you're comparing the correct branches?
– jonrsharpe
Nov 23 '18 at 15:50
add a comment |
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?
git git-clone
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?
git git-clone
git git-clone
edited Nov 23 '18 at 16:01
asked Nov 23 '18 at 15:47
Loop
84
84
3
That is what I see in the web interface: github.com/weiliu89/caffe/tree/master/docker. Are you sure you're comparing the correct branches?
– jonrsharpe
Nov 23 '18 at 15:50
add a comment |
3
That is what I see in the web interface: github.com/weiliu89/caffe/tree/master/docker. Are you sure you're comparing the correct branches?
– jonrsharpe
Nov 23 '18 at 15:50
3
3
That is what I see in the web interface: github.com/weiliu89/caffe/tree/master/docker. Are you sure you're comparing the correct branches?
– jonrsharpe
Nov 23 '18 at 15:50
That is what I see in the web interface: github.com/weiliu89/caffe/tree/master/docker. Are you sure you're comparing the correct branches?
– jonrsharpe
Nov 23 '18 at 15:50
add a comment |
2 Answers
2
active
oldest
votes
Clone the branch ssd
instead of master
:
git clone -b ssd https://github.com/weiliu89/caffe.git
1
Or you can trygit clone --branch=ssd https://github.com/weiliu89/caffe.git
.
– double-beep
Nov 24 '18 at 12:25
It's absolutely the same.-b
is just a short alias for--branch
.
– phd
Nov 24 '18 at 12:26
I know it. Just to make it better.
– double-beep
Nov 24 '18 at 12:37
add a comment |
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
withgit checkout -b
you will create a new branch. Maybe without the-b
option?
– double-beep
Nov 23 '18 at 16:03
yes, you are right. I have modified my answer. With -b you create a new branch.
– Pau Campaña Soler
Nov 23 '18 at 16:21
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53449581%2ffaithfully-clone-a-github-repository%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Clone the branch ssd
instead of master
:
git clone -b ssd https://github.com/weiliu89/caffe.git
1
Or you can trygit clone --branch=ssd https://github.com/weiliu89/caffe.git
.
– double-beep
Nov 24 '18 at 12:25
It's absolutely the same.-b
is just a short alias for--branch
.
– phd
Nov 24 '18 at 12:26
I know it. Just to make it better.
– double-beep
Nov 24 '18 at 12:37
add a comment |
Clone the branch ssd
instead of master
:
git clone -b ssd https://github.com/weiliu89/caffe.git
1
Or you can trygit clone --branch=ssd https://github.com/weiliu89/caffe.git
.
– double-beep
Nov 24 '18 at 12:25
It's absolutely the same.-b
is just a short alias for--branch
.
– phd
Nov 24 '18 at 12:26
I know it. Just to make it better.
– double-beep
Nov 24 '18 at 12:37
add a comment |
Clone the branch ssd
instead of master
:
git clone -b ssd https://github.com/weiliu89/caffe.git
Clone the branch ssd
instead of master
:
git clone -b ssd https://github.com/weiliu89/caffe.git
answered Nov 23 '18 at 17:31
phd
20.9k52442
20.9k52442
1
Or you can trygit clone --branch=ssd https://github.com/weiliu89/caffe.git
.
– double-beep
Nov 24 '18 at 12:25
It's absolutely the same.-b
is just a short alias for--branch
.
– phd
Nov 24 '18 at 12:26
I know it. Just to make it better.
– double-beep
Nov 24 '18 at 12:37
add a comment |
1
Or you can trygit clone --branch=ssd https://github.com/weiliu89/caffe.git
.
– double-beep
Nov 24 '18 at 12:25
It's absolutely the same.-b
is just a short alias for--branch
.
– phd
Nov 24 '18 at 12:26
I know it. Just to make it better.
– double-beep
Nov 24 '18 at 12:37
1
1
Or you can try
git clone --branch=ssd https://github.com/weiliu89/caffe.git
.– double-beep
Nov 24 '18 at 12:25
Or you can try
git clone --branch=ssd https://github.com/weiliu89/caffe.git
.– double-beep
Nov 24 '18 at 12:25
It's absolutely the same.
-b
is just a short alias for --branch
.– phd
Nov 24 '18 at 12:26
It's absolutely the same.
-b
is just a short alias for --branch
.– phd
Nov 24 '18 at 12:26
I know it. Just to make it better.
– double-beep
Nov 24 '18 at 12:37
I know it. Just to make it better.
– double-beep
Nov 24 '18 at 12:37
add a comment |
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
withgit checkout -b
you will create a new branch. Maybe without the-b
option?
– double-beep
Nov 23 '18 at 16:03
yes, you are right. I have modified my answer. With -b you create a new branch.
– Pau Campaña Soler
Nov 23 '18 at 16:21
add a comment |
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
withgit checkout -b
you will create a new branch. Maybe without the-b
option?
– double-beep
Nov 23 '18 at 16:03
yes, you are right. I have modified my answer. With -b you create a new branch.
– Pau Campaña Soler
Nov 23 '18 at 16:21
add a comment |
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
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
edited Nov 23 '18 at 16:20
answered Nov 23 '18 at 15:56
Pau Campaña Soler
1636
1636
withgit checkout -b
you will create a new branch. Maybe without the-b
option?
– double-beep
Nov 23 '18 at 16:03
yes, you are right. I have modified my answer. With -b you create a new branch.
– Pau Campaña Soler
Nov 23 '18 at 16:21
add a comment |
withgit checkout -b
you will create a new branch. Maybe without the-b
option?
– double-beep
Nov 23 '18 at 16:03
yes, you are right. I have modified my answer. With -b you create a new branch.
– Pau Campaña Soler
Nov 23 '18 at 16:21
with
git checkout -b
you will create a new branch. Maybe without the -b
option?– double-beep
Nov 23 '18 at 16:03
with
git checkout -b
you will create a new branch. Maybe without the -b
option?– double-beep
Nov 23 '18 at 16:03
yes, you are right. I have modified my answer. With -b you create a new branch.
– Pau Campaña Soler
Nov 23 '18 at 16:21
yes, you are right. I have modified my answer. With -b you create a new branch.
– Pau Campaña Soler
Nov 23 '18 at 16:21
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53449581%2ffaithfully-clone-a-github-repository%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
3
That is what I see in the web interface: github.com/weiliu89/caffe/tree/master/docker. Are you sure you're comparing the correct branches?
– jonrsharpe
Nov 23 '18 at 15:50