Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
+6 votes
2 views
in DevOps and Agile by (19.4k points)
edited by
I guess most of you, developers, use any VCS, and I hope some of you use Git. Do you have any tip or trick how to get a download URL for a single file in a repository?

I don't want the URL for displaying the raw file; in case of binaries it's for nothing.

http://support.github.com/discussions/feature-requests/41-download-single-file

Is it even possible to use GitHub as a "download server"?

If we decide to switch to Google Code, is the mentioned functionality presented here?

Or is there any free-of-charge hosting and VCS for open-source projects?

1 Answer

+6 votes
by (27.5k points)
edited by

Git doesn't support downloading parts of the repository. You have to download all of it. But you should be able to do this with GitHub. In GitHub when you view a file it has a link to the "raw" version of the file. Now all you have to do is copy the URL in your browser. Which can be done in two ways:

$ wget --no-check-certificate --content-disposition https://copied-URL/

$ curl -LJO https://copied-URL/

For more information regarding the git life cycle please go through this link:

 

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...