Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 8 down vote accepted

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

It should look like this:

https://github.com/user/repository/raw/branch/filename

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.

share|improve this answer
    
Oh man, that is just perfect, I want to give you extra points. – jake9115 Oct 16 '13 at 18:44
    
You are welcome. Nice that it works. – Christian Woerz Oct 16 '13 at 19:18
    
Now, is there a way to request an earlier version of the file? – Mikhail T. Mar 10 '15 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 '15 at 23:39
    
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 at 18:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .