Alexan
Alexan

Reputation: 8625

Can I connect from VS 2015 to VSTS and GitHub the same time?

I have solution in VS, which connected to VSTS to keep repository there. I know I can connect to GitHub from VS, but I want to keep connection to VSTS at the same time.

So I want to publish to both: VSTS and GitHub from VS.

Is it possible?

Or I need to synchronize repositories as described in this answer?

I prefer to do it from VS.

Update: I use git repo in VSTS.

Upvotes: 4

Views: 428

Answers (2)

starian chen-MSFT
starian chen-MSFT

Reputation: 33698

Refer to these steps to add a new remote in VS 2015.

  1. Connect to your VSTS git repository
  2. Click Settings

enter image description here

  1. Click Repository Settings

enter image description here

  1. Click Add link in Remotes section

enter image description here

  1. After that you can choose a remote repository when you push/sync to remote repository.

enter image description here

Upvotes: 5

VonC
VonC

Reputation: 1323951

Or I need to synchronize repositories as described in this answer?

This is preferable: you can initialize a git repo in your VSTS-managed repo, which means you can use the build phase to check and pull from the Git repo as described in the answer you mention.

That is because, if you chose to connect to connect to a Team Foundation Version Control (TFVC) repo, it cannot be a GitHub repo.

You can use Git and TFVC repos in the same team project, but you would still need build commands to synchronize that repo from GitHub, or configure said Git repo to push to two different upstream (TFVC and GitHub) repos.

Upvotes: 1

Related Questions