来自Github&的Visual Studio Clone推送到VSTS [英] Visual Studio Clone from Github & push to VSTS

查看:99
本文介绍了来自Github&的Visual Studio Clone推送到VSTS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我要实现的方案.

  1. 开源Project-X的代码由另一方(甲方)维护.

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

我们(乙方)从GitHub(发行分支)克隆Project-X

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

乙方在本地进行修改

签入VSTS存储库.

从VSTS到Azure进行部署

Do the deployments from VSTS to Azure

因此,这就像Party-B仅从GitHub读取更新,并将它们在本地所做的修改推送到VSTS(而不是Github).因此,实际的读/写将对VSTS进行. GitHub将仅用于读取第3方所做的更改.

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.

推荐答案

我这样做是为了维护博客的主题.它由Ghost维护,我已经进行了修改. 我已经为此写过博客.

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.

基本上,诀窍是将VSTS和GitHub作为远程添加到本地存储库:

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

然后在本地存储库中,您可以轻松地将来自github的更改合并到本地存储库中:

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.

此工作流程类似于您在GitHub中解决交叉回购请求的方式.

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

这篇关于来自Github&的Visual Studio Clone推送到VSTS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆