简体   繁体   English

合并GIT和SVN的变化

[英]merge changes with GIT and SVN

Here is my problem. 这是我的问题。 I am working with an external consultant, who created some code that he keeps in a GIT repo on github. 我正在与一位外部顾问合作,他在github上创建了一些GIT仓库中的代码。 Internally I have a development server that has SVN, and I can make a copy of his code in my internal SVN repo. 在内部我有一个具有SVN的开发服务器,我可以在我的内部SVN仓库中复制他的代码。 I don't want to give my consultant direct access to my internal server, but I want to be able to have any changes he makes (and saves on github) to merge with what is in my SVN repo. 我不想让我的顾问直接访问我的内部服务器,但我希望能够进行任何更改(并保存在github上)以与我的SVN仓库中的内容合并。 This does not have to be automatic whenever he updates github - I just want to have a fairly simple process that I can run to merge his changes into my internal SVN repo. 每当他更新github时,这都不一定是自动的 - 我只是希望有一个相当简单的过程,我可以运行它将他的更改合并到我的内部SVN仓库中。 Note that I will also be making changes myself to the code in the SVN repo, so I can't just mirror his github git repo to SVN every time he makes changes. 请注意,我自己也会对SVN repo中的代码进行更改,因此每次进行更改时,我都不能将其github git repo镜像到SVN。 So how can I make sure the SVN repo can keep track of changes that both of us make? 那么如何确保SVN回购可以跟踪我们双方所做的变化?

Clone your repo with git-svn and add his repo as a remote. git-svn克隆你的repo并将他的repo添加为遥控器。 Now you can merge his changes into your svn whenever you want to. 现在,您可以随时将他的更改合并到您的svn中。

Read this topic (with comments and warnings). 阅读本主题 (附注释和警告)。

In short - you can use SVN-client for accessing Git-repo, hosted on Github , but "dumb" merging of externals and local may be troublesome (test your case ) 简而言之 - 您可以使用SVN-client访问Github上托管的 Git-repo,但是对外部和本地的“哑”合并可能很麻烦(测试你的情况

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM