简体   繁体   English

将 svn 迁移到 git 并在 svn 上使用修订版签入到 git

[英]migrating svn to git and checking in to git with revision on svn

I have done migrating my repos from SVN to GIT.我已经将我的存储库从 SVN 迁移到 GIT。 Now developers have few changes on SVN repo.现在开发人员对 SVN 存储库几乎没有变化。 I need those changes alone to be checked in GIT by me.我需要单独在 GIT 中检查这些更改。 After cutover, I will have developers check in to GIT going.切换后,我会让开发人员签入 GIT。 How this can be accomplished using the revision number of SVN check-ins.如何使用 SVN 签入的修订号来实现这一点。 I don't think I can use subgit tool in my infrastructure.我不认为我可以在我的基础设施中使用 subgit 工具。

The first thing that you should do before migration is to lock the source repository for further writes.在迁移之前您应该做的第一件事是锁定源存储库以供进一步写入。 Better to lock now and restart the migrations from scratch.最好现在锁定并从头开始重新启动迁移。 If the commits are already done and you cannot restart it from scratch, you can create a diff from svn and apply it on git.如果提交已经完成并且您无法从头开始重新启动它,您可以从 svn 创建一个差异并将其应用于 git。

To generate a git compatible patch, use --git along with svn diff .要生成与 git 兼容的补丁,请使用 --git 和svn diff

svn diff --git -r <revision(s)>

Thanks.谢谢。 But my current situation is I am not sure what the revision numbers are because multiple developers made changes in a week or so.但是我目前的情况是我不确定修订号是多少,因为多个开发人员在一周左右的时间内进行了更改。 Now can someone lay out the steps that I should take to have those specific changes made to a file be moved to gitlab(not disturbing any changes to other files on git)现在有人可以列出我应该采取的步骤,以使对文件所做的那些特定更改移动到 gitlab(不干扰对 git 上其他文件的任何更改)

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

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