Skip to content

Support migrating to existing GitHub repository #1494

@yugannkt

Description

@yugannkt

Problem

Currently, gh ado2gh migrate-repo requires creating a new repository and fails if the target repository already exists with the error:

The Org 'xxx' already contains a repository with the name 'yyy'. No operation will be performed

Use Case

We have already created an empty GitHub repository and want to migrate our Azure DevOps repository (including PRs, comments, history) into this existing repository.

Current Workaround

The only option is to:

  1. Delete the existing GitHub repository
  2. Run the migration (which creates a new repo)

Requested Feature

Add support for migrating into an existing GitHub repository, either:

  • Option A: Add a --overwrite or --force flag to replace existing repo contents
  • Option B: Add a --target-existing flag to migrate into existing empty repos
  • Option C: Support migration without requiring repository creation

Environment

  • CLI Version: 1.26.0
  • Source: Azure DevOps
  • Target: GitHub Enterprise Cloud

Is there any existing way to accomplish this, or would this be possible to add?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions