user2058413
user2058413

Reputation: 815

Visual Studio Clone from Github & push to VSTS

Here is the scenario I want to implement.

  1. The code of opensource Project-X is maintain by some other party (Party A).

  2. We (Party B) clone Project-X from GitHub (release branch)

  3. Party B do modifications locally

  4. Check-In to VSTS repository.

  5. Do the deployments from VSTS to Azure

So, this is like Party-B only read updates from GitHub and push modifications that they do locally to VSTS (not Github). So actual read/write will take place to VSTS. GitHub will be only use to read changes done by 3rd party.

Upvotes: 1

Views: 448

Answers (1)

jessehouwing
jessehouwing

Reputation: 115037

I do this to maintain my theme for my blog. It's maintained by Ghost and I have made modifications. I've blogged about that.

Basically, the trick is to add both VSTS and GitHub as remotes to your local repository:

git remote add github https://github.com/org/project.git
git remote add vsts https://org.visualstudio.com/project/repo.git

Then in your local repository, you can easily merge changes from github into your local repository:

git checkout vsts/master -B master
git fetch github release
git merge github/release -m "Taking latest changes from Github"
git push vsts

This will merge the latest changes into your own project. You may need to resolve conflicts as part of the merge.

This workflow is similar the way you'd resolve a cross repo pull request in GitHub.

Upvotes: 2

Related Questions