Restore an earlier code version

Create softwareEnglish· 2 min read· Updated October 01, 2026

Return the repository to a recorded revision and check the rebuilt preview.

Choose the revision

Open the project’s Versions view and identify the revision you want. Read its description and inspect the available diff before restoring it. You need editing access and a valid connection to the project’s GitHub repository. Wait for other code changes to finish so that you are not restoring over an ongoing task.

What restoration changes

A GitHub revision restoration creates a new commit using the selected revision’s entire repository tree. This preserves the recorded files, binary assets and deletions while retaining the current history as the parent of the new commit. The selected old commit and the new restoration commit therefore have different identifiers.

Restoring application code does not reverse database rows, migrations, account connections or changes already made in external services. Review these separately when an earlier application version depends on a different database schema.

Check the outcome

Start restoration once and follow its recorded status. A pending or conflicting operation is not a completed restoration. When GitHub has changed concurrently, resolve the conflict rather than assume the selected version was applied.

The old preview is invalidated and may need rebuilding. After the code restoration completes, open the preview and check the intended pages and files. A completed repository operation alone does not prove that the new preview is already running.

Next steps

Code
Did this guide help?
Please leave passwords and private account details out of your feedback.