2

Could you please share your experience with Git to Clearcase migration ?

As we need to convert our repo to CC and keep history.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
user3544428
  • 357
  • 1
  • 3
  • 9
  • 6
    Wow, you are doing the exact opposite of the rest of the world :) – Martin G Jul 22 '14 at 13:11
  • 2
    The answer to this is to try to forget about keeping the history as quickly as possible and focusing on other requirements instead. Unless it is a very small repository. To give any recommendations i think you have to provide more information about the repository. Especially the branch situation – Martin G Jul 22 '14 at 13:23

1 Answers1

0

There is no real "experience" of such a migration, but if you need to keep the history, you can do so easily for one branch (like master), it is more difficult for multiple branches:

git filter-branch --tree-filter 'clearfsimport -preview -rec -nset . m:\MyView\MyVob\ParentDirectory' HEAD

For each commit of the git repo, you do a clearfsimport, in order to add or update files in a ClearCase dynamic view (as explained in "Creating a new subdirectory structure in ClearCase?")

See more about the filter-branch --tree filter in "Rewrite git history replacing a word in every single file", used usually to rewrite history, but used here to for another purpose (clearfsimport).

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250