← Back to all servicesUpdated 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.
Written by Charles
What you'll get
Account SettingsRepositoriesIssuesPull RequestsGistsActivity Log
Before you start
- 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.
- 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.
- 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
- Go to GitHub, then Settings, then Account. There is an Export account data link near the bottom.
- Click Request an export. GitHub emails a link, usually within an hour or so, and it stays valid for a few days.
- Download the ZIP. It is a directory of JSON files: repositories, issues, pull requests, comments, organisations, and a long activity log.
- 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.