[Solved] Migrating from On Premisis Source Control to Cloud


To move all your branches and history from 1 repository to another:

  1. Create an empty repository in your Azure DevOps project
  2. Clone your current repository (from TFS) using git clone --mirror $URL
  3. Add a new remote pointing to your Azure DevOps repository
  4. Push to the new remote

How the current man-page explains –mirror:

Compared to –bare, –mirror not only maps local branches of the
source to local branches of the target, it maps all refs (including
remote-tracking branches, notes etc.) and sets up a refspec
configuration such that all these refs are overwritten by a git remote
update in the target repository.

solved Migrating from On Premisis Source Control to Cloud