Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 533
Senthil A Kumar Avatar asked Mar 19 '10 12:03

Senthil A Kumar


People also ask

Is ClearCase better than git?

ClearCase merging is more efficient. In ClearCase, you can do a merge preview. And then you can divvy up the work and merge by file. However, merge conflicts can be time-consuming in ClearCase. Git merges can run into some issues, particularly if you have multiple teams working in the same repository.

Does git clone sync?

Any public Git repository can be forked or cloned. A fork creates a completely independent copy of Git repository. In contrast to a fork, a Git clone creates a linked copy that will continue to synchronize with the target repository.


2 Answers

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.

like image 195
VonC Avatar answered Oct 09 '22 23:10

VonC


While I wouldn't necessarily suggest it as the 'best' way of syncing the two, you can import history and push changes back to Clearcase via my git-cc tool, as mentioned here.

like image 41
charleso Avatar answered Oct 10 '22 00:10

charleso