[英]Best way to merge/patch changes between different git repos
I've been unable to find an adequate solution to this problem, so any help would be appreciated. 我一直无法找到适当的解决方案来解决此问题,因此将不胜感激。 Here is the setup:
这是设置:
git_svn_mirror
. git_svn_mirror
也被镜像到git repo git_svn_mirror
。 svn_branch
was created in the SVN repo. svn_branch
中创建了一个分支svn_branch
。 svn_branch
, including merging up from trunk several times. svn_branch
中完成了svn_branch
,包括从主干中合并了几次。 git_from_svn_branch
was created from svn_branch
. git_from_svn_branch
从创建svn_branch
。 git_from_svn_branch
. git_from_svn_branch
中完成。 svn_trunk
into git_from_svn_branch
. svn_trunk
HEAD合并到git_from_svn_branch
。 Diagram: 图:
[git_svn_mirror] [SVN] [git_from_svn_branch]
| <-mirror |
| <-mirror |
| <-mirror |-\ \
| <-mirror | | |
| <-mirror |-| |
| <-mirror | | --> (move to git) --> | (kept branch history only)
| <-mirror | |
| <-mirror | |
| <-mirror | |
| <-mirror | HEAD <----
| <-mirror | |
HEAD HEAD |
|
^ ^ |
|____________|__ how do we get one of these, into |__ this (or vice-versa)
Ignoring the issues that caused us to arrive at this situation ("why was a 2nd git repo created", etc) what is the best solution to the problem? 忽略导致我们遇到这种情况的问题(“为什么创建第二个git repo”等),什么是解决问题的最佳方法?
git remote add git-from-svn-mirror its://repo/url
git fetch git-from-svn-mirror
git merge git-from-svn-mirror/master
should do it. 应该这样做。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.