Skip to content

A way to include the actual commits of backupped PRs? #193

Open

Description

@Jackenmen

I've noticed that taking a backup of PRs doesn't include their actual commits in the git repository backup.
Is there a way to do this already that I might be missing? If not, would you accept a PR adding such functionality (by including refs/pull/*/head in the things to fetch from remote), and do you have any preferences on what it should look like?

Activity

  1. Iamrodos commented on Jul 26, 2026

    @Iamrodos
    Contributor

    Jumping in here after a long time.

    --bare already gets you this:

    github-backup -t $GITHUB_TOKEN -o ./backup --repository python-github-backup --repositories --bare josegonzalez
    

    That clones with git clone --mirror, so refs/pull/*/head comes down along with everything else. Just ran it against this repo and the backup has 391 pull refs in it. The gap is only doing the same without --bare.

    Is this still relevant for you? If so it looks like a fairly contained change for anyone who fancies having a go at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions