Senthil A Kumar Senthil A Kumar - 3 months ago 24
Git Question

Sync GIT and ClearCase

I am currently working on ClearCase and now migrating to GIT.
But we need this migration in a way that all work will be done in GIT and the data will be synced backed to ClearCase stream. We will have the same branch names and stream names in both GIT and CC, so scripting shouldn't be a problem. The problem here is,

Can someone suggest which is the best model to sync CC and GIT


  1. Have all the Vobs in CC as single repo in GIT, and have the major stream in CC as various branches in GIT. - Single GIT repo (VOBS) and many branches (CC streams). - This takes up less space as VOBs are kept as single repo with many branches.

  2. Have important CC branches as independent GIT repositories and each repository having all the CC VOBs. - Many GIT repo for many CC branch - This will take up lots of space as VOBs will be replicated across.



Which do you think is the best way to keep it in sync with ClearCase

Answer

Have all the Vobs in CC as single repo in GIT, and have the major stream in CC as various branches in GIT

No and yes

Have important CC branches as independent GIT repositories and each repository having all the CC VOBs

No and No

Re-reading my answer about Git limits, you shouldn't try to cram "everything" in a Git repo.
See also "What are the basic clearcase concepts every developer should know?" for a comparison between ClearCase and Git.

Stream can safely be imported as branch.
But VOBs are not necessarily a Git Repo.

If you are using UCM, I would recommend one Git repo per UCM component.

Anyway, you need to record in your Git Repo a way to know what ClearCase view to use to sync back (through a simple clearfsimport) your data.
The view used for that ClearCase data re-import will be a UCM view automatically associated to the right stream, for the right VOB.


Note: I mention in "How to bridge git to ClearCase?" a simpler solution, but which does not import the all history in a Git repo.