Skip to content

Source code

Find and export
your GitHub data.

A Git repository contains source files and their commit history. GitHub discussions, issues, pull requests and large-file storage can add separate material beyond that repository copy.

Report in
GB
Category
Source code
Last checked

Find your GitHub data size

  1. List the organization repositories with an owner or an account that can read the full scope, including private repositories.
  2. Ask a developer to create a mirror clone of each repository, a copy of its branches, tags and Git history.
  3. Measure the clone folders, using git count-objects -vH as a check on packed and unpacked Git objects.
  4. Fetch and measure Git LFS objects separately where used. LFS stores large files outside ordinary Git objects.
A repository API size is useful for an initial estimate. State whether your figure includes LFS, release files or discussion archives.

What to include in your data inventory

Report in GB, with repository count and a breakdown of code history and large files. Describe issues, pull requests and comments separately.

Use the oldest relevant commits or imported history for the start date, and include the contributing staff scope.

Add the dates covered and the people who use this software. Label estimates and describe how you calculated them.

Export your GitHub history

  1. Have a developer run git clone --mirror REPOSITORY_URL for each repository in scope.
  2. Where applicable, run git lfs fetch --all and retain the resulting objects with the repository archive.
  3. Collect repository wikis separately if required.
  4. For issues, reviews and pull requests, review GitHub's migration archive or API export routes with an organization owner.

A mirror clone provides Git history. Repository-hosted discussions, issue comments and release assets need their own supported collection routes.

Migration archives have documented exclusions, including LFS and some other resource types. Check their scope against the inventory.

Why GitHub data has value for AI training

Commit history can connect a code change with the surrounding implementation.

Issues and review discussions can explain the problem, proposed approach and feedback that shaped it.

What stays private

Choose the repositories and discussion records in scope, reviewing proprietary code rights, embedded credentials and third-party material.

Telegraph Lab reviews the proposed material with you and agrees how sensitive information will be handled. Preparation can include excluding material, redacting details and replacing personal identifiers. Your company keeps ownership; the licensing agreement defines the material, permitted uses and authorized recipients.

Common questions about GitHub data

Does a clone include issue discussions?

Git history is separate from GitHub's issue and review records. Export those through their supported routes.

What is a mirror clone?

It copies the repository's branches, tags and history for an archive.

Are large LFS files included automatically?

Fetch LFS objects explicitly and measure them separately from ordinary Git objects.

Which period should we report?

Use the retained commit and discussion history, noting any imported repositories.

Your data inventory

Add your numbers to the picture.

Enter the quantities and years covered in your data inventory, then share it with your Telegraph Lab contact. We’ll review the material and discuss the next step with you.

Discuss your data