2017-06-17 67 views
0

我有一个git仓库,它包含两个svn仓库源代码的两部分。问题是,在这段短时间内,这三个储存库正在维持同一时间。一些新功能被添加到git仓库中,而所有这些功能都需要修复错误。 现在我需要将git仓库中的一些提交(一些bug修复)合并到这两个svn仓库中,那么最佳做法是什么?任何人都可以提供帮助?如何合并一些提交从Git到SVN?

回答

0

您可以尝试,并按照 “git-svn with multiple svn repositories”,使用.git/config宣布双方的svn回购:

[svn-remote "svn"] 
url = http://my.repo.example.org/trunk 
fetch = :refs/remotes/git-svn 
[svn-remote "othersvn"] 
url = https://my.newrepo.example.org/trunk 
fetch = :refs/remotes/visualsvn 

然后:

git svn fetch --all 
git checkout svn -b localsvn 
git checkout othersvn -b localothersvn  

然后,您可以合并使用Gi​​t的承诺这些分支(一个分支一次),并从每个分支做一个git svn dcommit