I used JetBrains Spaces for all my repos. With them shuttdown that service I had to migrate a lot of repo's out. I wrote this script so that I could take the locally downloaded version and migrate it to another Git Repo (Azure DevOps).
This script will read the location repo from your clone. Then upload to the url of the repo you provide. This will include the check in history and branches.
This script will also make sure that "master" is set to "main". I did this because all new repo's I create in Azure DevOps use "main" instad of "master"
- Copy script into a .bat file
- Run as Admin
- Copy the location of your repo you want to migrate. Again, this needs to be a local clone on your machine.
- Copy the url of the repo you want to send the repo to. For Azure DevOps this is the url in the navigation bar, not the clone url.
- Wait for it to complete
- Verify branches, history and repo contents have migrated successfully.