Archive for February, 2015

Downloading raw files from github

If you want to download a file directly non-interactively from github (for example in a script), you get some HTML page showing the file with line numbers etc. So if you want to download the file raw, you just modify the URL, as follows:

If you want to get<my>/<repo>/<file>
You use as URL:<my>/<repo>/raw/<file>

And if you want to download this file from a certain branch on the repo, you use:<my>/<repo>/raw/<branch>/<file>


  • <my> is the user or organization name on github
  • <repo> is the repository name
  • <branch> is a branch on the repository
  • <file> is the file you want to download
Saturday, February 7th, 2015 github No Comments