问题
At my company, we are transitioning (fully) from ClearCase UCM to Git. We will not be using Clearcase after some time using Git.
In the transition, are there any good tools that will bring the history from ClearCase into Git somehow?
Also, I have read a lot that one component = one repo. However, we want to reorganize and split the current component into smaller parts. (The person that set up ClearCase didn't really plan ahead.) Is there also a way to do this?
Any comments would be appreciated - including answers and other things to watch out for during the transition.
回答1:
At least, with ClearCase UCM, you have full baselines to work with, that is labels which are set on all the files of a given component.
By experience, you never import the full history from ClearCase to a Version Control Tool which is based on revision across the the referential (see the difference between ClearCase and Git: ClearCase has an history set file by file, not "revision by revision")
What I usually do, as I mention in my answer "Sync GIT and ClearCase" is:
- one Git repo per UCM component
- import only the last 3 or 4 baselines for the Integration Stream
- import a few baselines from sub-Streams only if it is really needed
- Lock the UCM vob and keep ClearCase in read-only mode for archive
回答2:
Try this tool to import history from ClearCase to git: https://github.com/charleso/git-cc
Regarding the reorganization of repos when migrating from ClearCase to git, there were few discussions on SO, for example this one: Sync GIT and ClearCase
回答3:
I would not retire clear case immediately. What you want to do is commit the tips of any branches in clear case and any tags. This should be done in a fashion that mirrors what happened in clear case (preserve logical branch points, etc). Use git from that point on. Refer to clear case if you need to dig into history. Eventually archive clear case and only restore it if you are in a bind to see some old commits. Importing old history is not worth the trouble in my experience. It is often very time consuming and error prone.
来源:https://stackoverflow.com/questions/12410521/save-history-from-clearcase-to-git