How to Use Github to Retrieve an Older Version of Your Site
May 27, 2018
By using Git + Github, all the commits you've ever made since your initial commit are available to you. You can just follow these steps to access a previous iteration of your site:
- Go to your site's Github repository.
- Click on the link showing the total number of commits in the repository (it should be at the top left of the table showing all your files and folders). After clicking on the link, a list of commits should pop up.
- Navigate to a commit made on the date you want. For example, if you want to retrieve your site the way it looked in March 22, 2015, find a commit made on that day.
- Click on the commit hash located to the right of the commit description. It should be a combination of letters and numbers, like
0f7411e. After you click on it, you should see the details of that particluar commit, and a “Browse Files" button at the top right of the table.
- Click on the “Browse Files" button. You should now see all your site's files.
- Click on the green “Clone or Download" button at the top right of the table and then follow the normal process to clone the repository to your local computer.
- In your local computer, navigate to the newly created folder where the files you just cloned are located, and open the
index.htmlfile with your broswer. You should now see your site, exactly like it looked on March 22, 2015!