azure-devopsazure-repos

How to Copy Folders and Files to a Repo in Azure Devops


I would like to copy all files and folders from one Repo to another.

For example in the image there is a folder called root4adf with a number of sub-folders.

enter image description here

I would like to copy all the folder root4adf and sub-folders to a new folder called uploadfolder.

enter image description here

I attempted this by downloading the root4adf as a zip file in the hope that if I uploaded the zip the process would upload the folders and files from the zip file, but it didn't. And it doesn't appear to be possible to upload folders and files to another folder.. unless you upload individual files.


Solution

  • Azure DevOps uses git as it's repository manager. There are built-in tools for DevOps that would allow you to migrate entire repositories between Project, but for specific folders you'll need to use specific git management tools to move a folder and it's contents.

    I would recommend using Visual Studio (Code) for your transfer. Download this repository locally, then open a new git connection to the new repository. After, copy the folder of in question into the local instance of the new repository, then commit the changes to the new repository.