Search code examples
gitazureazure-boards

Copying repo in Azure copies all commit-links in Azure Baord


I have a repo in Azure git that contains many commits that solve some userstories within my Azure DevOps board. Now I want to copy that repo into a new one. To do so I add the new repo as second remote in my local repo and push my main branch to that second repo:

git remote add MyNewRepo https://dev.azure.com/mynewrepo
git push MyNewRepo myoldmainbranch

As many of the commits in my old repo are linked to user-stories, those links are essentially duplicated for the new repo as well, when I do that push. So when my user-story referenced commit 1 from my old-repo, it does now reference commit 1 from both the new and the old repo. However I want all the user-stories to completely stay untouched.

Is there any way I can omit copying those links in the user-stories?


Solution

  • All we need to do is to disable the "commit mention linking" in the new Repositories-section within your Project Settings:

    enter image description here

    This will disable the creation of links in the user-story.