0

For the same url,wget can get it ,git clone can't.

url="https://raw.githubusercontent.com/emmetio/emmet/master/lib/snippets.json"
wget $url 

An error occur when to get with git clone.

git clone $url
Cloning into 'snippets.json'...
fatal: repository 'https://raw.githubusercontent.com/emmetio/emmet/master/lib/snippets.json/' not found

Same errors for both
url="https://raw.githubusercontent.com/emmetio/emmet/master/lib/snippets.json"
and
url="https://raw.githubusercontent.com/emmetio/emmet/master/lib/snippets.json/".

  • 1
    error because have a forward dash after `snippets.json` – Felix Jun 12 '17 at 04:30
  • i think `git clone` just for get whole repository, not for a single file. Try this `git archive --remote=git://git.foo.com/project.git HEAD:path/to/directory filename | tar -x` – Felix Jun 12 '17 at 04:54
  • See https://stackoverflow.com/q/1125476/6309 – VonC Jun 12 '17 at 06:08

0 Answers0