Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Disconnect" forked Git repos in VSTS

Tags:

azure-devops

In VSTS, I forked a repository to develop a separate product from the original repo.

When I make a PR from a branch into master in my forked repo, VSTS defaults to merging into the original repo. I have to be sure not to mistakenly merge into the original repo with every PR. VSTS new PR menu

VSTS seems to think that I may want to merge changes from my forked repo into the original one. I have no plans to do so. How do tell VSTS to 'disconnect' my forked repo from the original?

like image 978
Dan Schnau Avatar asked Oct 24 '25 17:10

Dan Schnau


2 Answers

No, there isn’t such feature in VSTS, there is the user voice that you can vote: Allow option of converting forks to repos

like image 186
starian chen-MSFT Avatar answered Oct 27 '25 03:10

starian chen-MSFT


Work-around

As a work-around (in Visual Studio) until it's fixed:

  1. Pull the repo.
  2. Delete the remote repo.
  3. Create a new remote repo with the same name.
  4. Push the repo.

You might have to create a temporary remote repo (named temp if you'd like) in order to be able to delete the remote repo. You can delete the temporary remote repo, named "temp", after you've pushed to the new remote repo.


You'll most-likely break anything (pull requests, work items) linked to the repo and also have to re-apply any policies and security stuff.


  • repo = the faulty fork in VSTS.
  • temporary remote repo = a temporary tepo created if you cant delete the fork repo.
  • new remote repo = the new repo to be used instead of the fork.
like image 28
Mikael Dúi Bolinder Avatar answered Oct 27 '25 04:10

Mikael Dúi Bolinder