- View code in private projects: At least Basic access. - Clone or contribute to code in private projects: Member of the Contributors security group or corresponding permissions in the project. - Set branch or repository permissions: Manage permissions permissions for the branch or repository. - Change default branch: Edit policies permissions for the repository. - Import a repository: Member of the Project Administrators security group or Git project-level Create repository permission set to Allow. For more information, see Set Git repository permissions.
- View code: At least Basic access. - Clone or contribute to code: Member of the Contributors security group or corresponding permissions in the project.
As shown, you need to move the MigrationDemo repo, from the FabrikamOld to the new Fabrikam team project.
How do I move?
You have two options as outlined below. Import functionality is easier, but is only available in Azure DevOps Services and TFS 2017 Update 1 and above.
Use Import Git repository functionality
Using the Import Repository feature, you can import a Git repository to your team project from Team Foundation Server (TFS), Azure Repos or any other Git source code provider like GitHub. Review the import repository documentation for more details.
Manually migrate the Git repo in five easy steps:
Create an empty Git repo.
From the code explorer, click on the repo name. Choose New Repository from the list, select Git as the type, and give it a name.
Once the repo is created, you are presented with step-by-step instructions to quickly get started. Copy the Clone URL to your clipboard.
Svarīgi
Clear the Automatically create links for work items mentioned in a commit comment if you are importing from a different project collection or a foreign git repository. Azure DevOps will otherwise associate the commits to existing work items of unrelated team projects in the team project collection.
Mirror the repository
Switch to a Developer Command Prompt and path to your local (source) repository for the MigrationDemo repo in FabrikamOld. Run the git clone --mirror command, using the Clone URL from above.
As shown, the clone --mirror is redundant in this case, as the remote repository is bare. It is used here as a safe and easy way to set up the remote.
Push the repo
Run the git push command to push the local changes to the remote (target) repo.
The --mirror option is used with both the clone and push command. The option ensures that all branches and other attributes are replicated in the new repo.
Validate the new repository
Switch to the Azure DevOps web portal and validate the new repository and the history in the CODE hub.
Verify that all your branches were moved over to the new repo.
Configure the new repo
Verify that the permissions and policies are correctly configured for the new repo. You can configure the security after step 1, or at this stage. Reconfigure your builds to connect with the new repo. Lastly, notify users of the original repo to update their remotes in Visual Studio, or running the git remote set-url origin command.
Remember to clean up the original project by either deleting the repo (be careful, there's no undo) or locking the branches so that no one accidentally keeps updating it.
(c) 2016 Microsoft Corporation. All rights reserved. This document is
provided "as-is." Information and views expressed in this document,
including URL and other Internet Web site references, may change without
notice. You bear the risk of using it.
This document does not provide you with any legal rights to any
intellectual property in any Microsoft product. You may copy and use
this document for your internal, reference purposes.
Pievienojieties meetup sērijai, lai kopā ar citiem izstrādātājiem un ekspertiem izveidotu mērogojamus AI risinājumus, kuru pamatā ir reālas lietošanas gadījumi.
This certification measures your ability to accomplish the following technical tasks: Design and implement processes and communications, design and implement a source control strategy, design and implement build and release pipelines, develop a security and compliance plan, and implement an instrumentation strategy.