1

Can anyone help me to know the Git commands equivalent of clearcase commands?

user11668570
  • 215
  • 1
  • 7

3 Answers3

2

I have documented extensively the differences between Git and ClearCase by the past (file-based vs repo-based, centralized vs. distributed)

This is not about dynamic view and MVFS, since Git is (slowly) incorporating the equivalent, VFS for Git (formely known as GVFS).

This is about:

If you were using ClearCase UCM, then the relevant unit of work is an UCM component, which is akin to a Git repository:

ct mkview/co <==> git clone/checkout 
ct mkbl      <==> git tag
ct ci        <==> git commit+git push
ct deliver   <==> git merge
ct rebase    <==> git rebase (to an extent)
Jean-François Fabre
  • 137,073
  • 23
  • 153
  • 219
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • there's also almost direct `git rm` => `ct rmname` and `git mv` => `cleartool move` commands. `mkview` could be also seen as `git init` (create view / vs repository) but depends on how you work – Jean-François Fabre Jan 03 '20 at 08:50
1

There is no one-to-one mapping here. ClearCase commands, like ClearCase itself, are file-oriented: one checks in or out an individual file at a time. Git's storage is commit-oriented: a new commit is a new snapshot of every file, not just some changed one(s).

Another fundamental difference is that ClearCase is centralized, while Git is distributed. That is, for each ClearCase VOB, there is a single master VOB (even though it may be replicated). That VOB holds the database of file versions (technically elements). If some duplicate VOB disagrees with the master version, the duplicate is wrong. With Git, however, no one Git repository is any more correct than any other Git repository. If two Git repositories disagree as to the set of commits, both repositories are right.

Besides this, ClearCase offers abilities that Git just doesn't have. Using cspecs, you can construct ClearCase dynamic views that have no parallel in Git. ClearCase also lets administrators lock particular elements, grant limited access rights to specific users, and so on. ClearCase stores directories (and directory modifications); Git stores only files.1

The two systems are so different that I recommend stepping back from all of this and just learning Git directly. Attempting to map ClearCase concepts onto Git will leave you extremely frustrated.

See also What are the basic clearcase concepts every developer should know? and How to bridge git to ClearCase?


1Sales and marketing types would have you believe that this proves ClearCase superior to Git. I would ask you to consider whether you would like your pocketknife to have hundreds of specialized blades, or just a few really good ones. (Use some other favorite tool analogy here, if you have one.)

torek
  • 448,244
  • 59
  • 642
  • 775
1

It's all about the tool that best fits your needs,and development model. GIT repositories share some issues, from a policy management standpoint, with newly created Multisite repositories. (Policies not applied globally)

An admittedly biased comparison is here: http://www.cccqcommunity.com/blogs/why-use-clearcase-when-git-is-free

Last I checked, GITs vfs is Windows-only, and didn't support the extremely fine grained build auditing the MVFS, combined with clearmake/clearaudit/Omake supports. Whether that's important is your decision.

Brian Cowan
  • 1,048
  • 6
  • 7