View a specific commit to the gh-pages branch on github.io

githubgithub-pages

Say I have a site at myname.github.io/repository.html

Can I view that page using a specific commit to that repository? For example, myname.github.io/repository.html?commit=397cb59 or something similar, to view past versions of that page?

Best Answer

No, the rendered versions of GitHub pages are not archived.

Some alternatives:

  1. You can build such an archive yourself by following for example these instructions - although this would become a bit cumbersome to do for each commit. You could automate it though via CI.

  2. If you only need the source code of the page, not the rendered result, you can of course just browse your repository and select the commit you are looking for.

  3. If your site is reasonably popular, it is probably indexed by the Internet Archive's Wayback Machine. This won't let you choose a specific commit, but you can look through the old versions archived to possibly find the matching one.