Docs/Backups/Downloading & Restoring

Downloading & Restoring

Download archives and restore your code from backups.

Downloading Archives#

To download a full archive backup:

  1. Go to your project's Backups tab
  2. Find the archive backup you want to download
  3. Click the Download button
  4. The ZIP file will download to your computer

Archive backups contain all files from your repository at the time of backup.

Restoring from Git Reference#

Git reference backups store the commit SHA, allowing you to restore using Git commands:

  1. Find the backup in your Backups tab
  2. Copy the commit SHA shown for that backup
  3. Use Git to restore to that commit

Restore Commands

To view the state of your code at a specific commit:

git checkout <commit-sha>

To reset your branch to a previous commit (use with caution):

git reset --hard <commit-sha>
git push --force origin main

Force Push Warning

Using git reset --hard and force push will overwrite remote history. Make sure this is what you want before proceeding.

Restoring from Archive#

To restore from a downloaded archive:

  1. Extract the ZIP file to a folder
  2. Review the files to confirm they contain what you need
  3. Copy files to your project directory, or initialize a new Git repository

Archive Recovery

Archive backups are useful when your GitHub repository has been deleted or corrupted. They provide a complete standalone copy of your code.