从SVN到Git的增量迁移 [英] Incremental Migration from SVN to Git

查看:166
本文介绍了从SVN到Git的增量迁移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑以下情况:

假设我的svn储存库包含 100个修订版本,该版本已迁移到Git储存库(因此我的Git包含100个修订版本).

Suppose my svn repository contains 100 revisions, which has been migrated to Git Repository (So my Git contains the 100 revisions).

现在我的svn信息库已更新,比如说有5个以上的修订版本,因此它具有 105个修订版本. 我如何仅将修订版101 t0 105迁移到我的GIT存储库?

Now my svn repository got updated, say with 5 more revisions hence it has 105 revisions. How do i migrate only the revisions 101 t0 105 to my GIT repository?

我面临的主要挑战:

  1. 我不想同时同步SVN和Git.(SVN即将停用)
  2. 我需要使用其历史记录迁移修订本.

我尝试跟进这些对我没有帮助的链接(fyi)

I tried following up with these links which dont help me,(fyi)

  1. 使用 svnsync

使用 git svn clone

推荐答案

使用git-svn.进行初始克隆git svn clone ...时,将获得前100个修订版.稍后您执行git svn fetch,它将获取新出现的5个修订.

Use git-svn. When you do initial clone git svn clone ... you will get the first 100 revisions. Later you do git svn fetch which would fetch the newly appeared 5 revisions.

所有105个修订版本将以正确的顺序显示,因此将保留历史记录.

All 105 revisions will be present in a correct order thus the history will be preserved.

更新:

如果您希望避免获得前100个修订版,请首先使用提取进行git svn init:

If you wish to avoid getting first 100 revisions, do git svn init with fetch initially:

git svn init ...
git svn fetch -r <svn revision you want to start from>

这篇关于从SVN到Git的增量迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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