Just like the question says... I am looking for a free version control system that allows me to share individual scripts out of a larger project.

So, can GitHub or BitBucket do something like this? Is it possible to have a public repository with many scripts, and send someone a link for downloading an individual script?

1 Answer 1


In GitHub, if you view a file, there is a link to the raw-version of the file.

It should look like this:


When you replace the blankets, with the real filename etc, than you can download it with curl or wget. So you could send this link to share this file. But it won't have version-control features from git etc.

  • Oh man, that is just perfect, I want to give you extra points.
    – jake9115
    Oct 16, 2013 at 18:44
  • You are welcome. Nice that it works.
    – Christian
    Oct 16, 2013 at 19:18
  • Now, is there a way to request an earlier version of the file?
    – Mikhail T.
    Mar 10, 2015 at 4:20
  • You can use the commit ID to get an earlier version https://github.com/user/repository/raw/{commitID}/filename
    – Sthe
    Oct 12, 2015 at 23:39
  • 1
    Note that you should copy the link that "Raw" points to rather than the resulting page. It will be of the format https://github.com/{user}/{repo}/raw/{branch}/{path}. If you click the link, it will redirect you to a page which requires a token and the path is slightly different: https://raw.github.com/{user}/{repo}/raw/{branch}/{path}?token={token}. Giving it the wrong token will result in a "Not Found" page, thus you should use the first URL.
    – Senseful
    Jul 5, 2016 at 18:19

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.