GitHub's version control features allow us to see the complete history of a doc, access a doc at any point in time, and find deleted docs without manual backups.
Use any of these options to check or "diff" the history of a file.
Option 1: GitHub history tab
- Navigate to the doc on the doc site and click Edit page in the right nav.
- Click History in the top right corner of the doc.
Option 2: githistory.xy
Navigate to your specific file on GitHub.com:https://github.com/newrelic/docs-website/blob/develop/src/content/docs/browser/new-relic-browser/browser-agent-spa-api/add-page-action.mdx
In the url, replace
It will take you to a site which presents the visual history of that specific file. You can view changes by clicking through the commit history at the top of your page.
Option 3: Git blame
Follow GitHub's documentation.
Alternatively, you can use the following command in your terminal:
git log --follow "**/file_name_here.mdx"
This will output the commit history of that file. By default, it only shows the first few commits. You can scroll by pressing Return multiple times.
For example, to find the commit history for
vmware-vsphere-monitoring-integration.mdx, I would run:
git log --follow "**/vmware-vsphere-monitoring-integration.mdx"
We had a large site restructure in October 2021 which lost most of the file history for our docs. You can find an archived version of our site pre-rework in the pre-IA-2021 branch. By navigating the pre-rework version of our repo, you can find file history and more.
There are multiple ways to find deleted files. These are roughly ordered by complexity: