How to get the ID of a specific gist revision?

181 Views Asked by At

I try to use the following link template to reference different revisions of a gist:

https://gist.githubusercontent.com/<username>/<gist-id>/raw/<revision-id>/<filename>

but I can only get the latest <revision-id> when accessing the 'raw' version of the file.

How to get the <revision-id> of an arbitrary revision?

1

There are 1 best solutions below

0
Prectron On BEST ANSWER

The template you use should work. Make sure you replace <revision-id> with the correct commit hash. In the GitHub UI, go to Revisions, find the proper one, on the file under ... click View file, and then the Raw button.