How to fork a cloned repository in Visual Studio

Published on Saturday, January 27, 2018

How to fork a cloned repository in Visual Studio

based on these gists

fork the repository in github

go to team explorer repository settings Repository Settings rename local origin to upstream (and update push address to the new repo, or you will always have items waiting to be pushed)

Rename remote to upstream add new remote called origin Repository Settings commit any changes

fetch from new origin - won't work if there are conflicting changes, pull and merge worked

update push remote to use origin rather than upstream, otherwise you will still be pushing to the original repo which you likely don't have permissions on and will see something like

Error encountered while pushing to the remote repository: Git failed with a fatal error.
unable to access '': The requested URL returned error: 403
Pushing to