2

When I do

~$ git clone https://github.com/tensorflow/models/tree/master/research/inception/inception

I get an error:

Cloning into 'inception'... remote: Not Found fatal: repository 'https://github.com/tensorflow/models/tree/master/research/inception/inception/' not found

And the URL actually works when I paste it into my browser. So I am confused about what the problem could be here. Thanks

Tirth Patel
  • 5,443
  • 3
  • 27
  • 39
Huzo
  • 1,652
  • 1
  • 21
  • 52

2 Answers2

2

You are using an incorrect inner URL. With Git you cannotclone selectively.

The correct URL should be,

https://github.com/tensorflow/models.git

The command is,

git clone https://github.com/tensorflow/models.git
Chathuranga Chandrasekara
  • 20,548
  • 30
  • 97
  • 138
1

I see, but if I want to clone the sub-directories such as inception do I still have to use the URL above?

While you would still clone the full repo, you can do a sparse checkout

mkdir myrepo
cd myrepo
git init
git config core.sparseCheckout true
git remote add -f origin https://github.com/tensorflow/models.git
echo "path/within_repo/to/desired_subdir/*" > .git/info/sparse-checkout
git checkout [branchname] # ex: master
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250