Many government agencies have strict records retention requirements. The following are some strategies agencies and other large enterprise organizations have employed:
Git - Git itself is a distributed version control system, meaning in terms of source code and documentation, the agency has a complete copy of everything that GitHub has. Agencies may choose to augment this with automated or regular backups, which is as simple
Email - If the government employee follows best practices and uses their government email address for notifications for government organizations, all notifications (comments, pull requests, etc.) will land in the user’s email, and thus fall under existing records retention practices.
Documentation - GitHub pages-backed documentation is versioned within the Git repository itself, the history for which would be available to any mechanism that can access Git history. Wikis are also versioned by Git, but have their own, wiki-specific endpoint which must be independently tracked.
RSS - Various aspects of the site expose activity feeds in the form of RSS, which can be consumed by existing RSS record aggregators or converted to email
Audit logs - Organizations administrators have access to an organization-wide audit log, which records all activity within the organization.
API - With the exception of the organization audit logs themselves, all information on the site is exposed via the API, which, in conjunction with organization webhooks (outbound API) can be used to automate records retention in a highly granular way.