从clearcase转到git。需要转储历史 [英] Moving from clearcase to git. Need to dump history

查看:149
本文介绍了从clearcase转到git。需要转储历史的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Clearcase存储库,我打算将其移至git。除了我以前的答案

I have a clearcase repository and I am planning to move it to git. Is there a way I can dump all the history?

推荐答案

//stackstackflow.com/a/26967852/6309\">ClearCase向Git迁移(2014年),与2016年的 Git-ClearCase方法,我要添加(2016):

In addition to my old answer "ClearCase to Git migration" (2014), and by contrast with the 2016 "Git - ClearCase methodology", I would add (2016):

您需要检查:


  • 要导入的性质(是完整的ClearCase Vob)还是要导入的定义明确的ClearCase文件夹?

  • ClearCase UCM或非UCM?

  • 在ClearCase Vob的历史记录中您是否有一些标签(或UCM基准)?

仅标记(或基线化)的ClearCase版本可以安全地导入git repo,因为它们类似于git commit。

Only labelled (or baselined) ClearCase versions can be safely imported into a git repo, as they are similar to git commits.

另一种方法是实际转储历史记录(即不要将其保留在新的git repo中),将历史记录保留在ClearCase中(在只读模式下

The other approach is to actually dump the history (ie not keep it in the new git repo), keep said history in ClearCase (in read-only mode for archive).

然后解决方案很简单:转到ClearCase快照视图,执行 git init。,然后 git add。 git commit -m首次导入

您可以添加一个远程服务器(到一个空的裸仓库),按一下就可以了。

Then the solution is simple: go to a ClearCase snapshot view, do a git init ., then git add ., git commit -m "first import".
You can the add a remote (to an empty bare repo), push and you are done.

git remote add origin /url/to/bar/repo
# for instance
git remote add origin https://github.com/<user>/<repo>
# or an internal server to your company
git remote add origin https://mycompany.com/gitlab/<project>/<repo>

git push -u origin master

这篇关于从clearcase转到git。需要转储历史的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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