1

I am new to git and want to download some code from GitHub, for which I have a URL: https://github.com/PointCloudLibrary/pcl/tree/master/doc/tutorials/content/sources/qt_visualizer

I have installed git on Ubuntu, but now I want to download all 7 files in the above URL. There appears to be no buttons on the website to download these files. So what commands do I use with git to download them from the terminal?

  • 1
    does git clone https://github.com/PointCloudLibrary/pcl.git work? It would of course clone all in pcl.git? – humanityANDpeace Oct 14 '14 at 17:40
1

There is sparse checkout in git, however you still need to clone the whole repository first, and it seems this not what you want (pcl is large package after all).

Therefore you have to download these files one by one from raw url:

wget https://raw.githubusercontent.com/PointCloudLibrary/pcl/master/doc/tutorials/content/sources/qt_visualizer/CMakeLists.txt
wget https://raw.githubusercontent.com/PointCloudLibrary/pcl/master/doc/tutorials/content/sources/qt_visualizer/main.cpp
[...]

Unfortunately github doesn't allow to download whole content of git directory recursively (with wget -r).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.