← Back to all services
GitHub service icon, on a page about downloading your GitHub data
Development

GitHub

Updated Sep 28, 2026

GitHub stores your code and your account separately, and only one of them exports. The data request gives you a JSON file describing your account: repositories, issues, stars, organisations, followers, gists. It does not contain your code. A real backup means cloning every repository yourself, and that clone is the part almost everybody skips.

What you'll get

Account SettingsRepositoriesIssuesPull RequestsGistsActivity Log

Before you start

  1. Before anything else, push your gists somewhere real. They are not in any repository, so a git clone will not include them, and losing an account takes every anonymous gist with it.
  2. Note which repositories you actually care about. Cloning every fork and every one-off experiment produces a folder of noise you will never open again.
  3. Know what is in your private repositories. This is the part people do not think about, and a zip of your whole account is not somewhere you want to leave on a desktop.

How to download

  1. Go to GitHub, then Settings, then Account. There is an Export account data link near the bottom.
  2. Click Request an export. GitHub emails a link, usually within an hour or so, and it stays valid for a few days.
  3. Download the ZIP. It is a directory of JSON files: repositories, issues, pull requests, comments, organisations, and a long activity log.
  4. Then do the part that matters. Clone each repository with git clone, or run a script over the whole account, and push the result to a machine or a drive you own.

Pro tip

The export is metadata, not a backup. It describes what you have, it does not contain the source. If your account is gone tomorrow, a JSON file listing your repositories is not much use to you, and the fix is one command in a terminal. Do both, but understand that only the second one is the backup.

After the download

  • The repository list in the export is the most useful file in it. It lists every repository, whether it is public, and what language it is in, which is a good way to notice the two or three you forgot you had.
  • The activity log is a long timestamped list of everything you did, going back to the account being created, and it will make you feel things about your own 2019.
  • Issues and pull requests come out as a summary, not the full comment threads. Anything that mattered should have been written down somewhere durable at the time.
  • An empty repository is not backed up by a clone. Empty means no commits means nothing to clone, and that is exactly the repository with three years of issues in it.
  • A repository is not a backup until it exists in two places. A second remote, or a nightly mirror to a drive you own, is the whole difference between an archive and a copy.
  • Not sure where to store your export? See our backup guide.

About the author

Charles runs Digital Takeout Day, a twice-yearly reminder (May 8 and November 8) to download and back up your data from every online service you use.

Every guide is cross-checked against the platform's own export documentation and re-verified before each Takeout Day.

Read the full bio, editorial policy, and contact →