How to integrate Clearcase developpement history into Git?

喜欢而已 提交于 2019-12-08 07:53:11

问题


First off : yes I know there are several CC--git migration subject, but they don't offer anything valuable to my problem. They deal with some ways to use git locally and push back to ClearCase, which is more or less the opposite of what I want to do.

I am responsible for integrating work from 2 production sites (I am also a programmer in one of these production site).

  • Site #1 (mine) is where integration is done and we use git (Single repository master/devel/topic branches)

  • Site #2 uses ClearCase...

Has anyone been in this situation and What do you suggest as a workflow to integrate their work into our git history ?


回答1:


Yes,the main advice is to realize that since ClearCase operates file by file (as opposed to git which has a commit for the all content of the repo), it is best to push to git a coherent states of the ClearCase view.
(See more differences between ClearCase and Git in this answer)

The usual way for a git repo to be aware of modifications done in a ClearCase view is to set the environment variables:

  • GIT_DIR to the path of the git repo (or a local clone of an upstream git repo)
  • GIT_WORK_TREE to the path of the ClearCase view

That way, you can get git status, git add, git commit working with the ClearCase file while updating your git repo index.

But I only check the diff, add and commit when I have, for instance, set a label (or in my case, an full UCM baseline), which marks a coherent set of files. Those modifications can then be detected and imported as a all in the git repo.



来源:https://stackoverflow.com/questions/23886793/how-to-integrate-clearcase-developpement-history-into-git

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!