1

First off : yes I know there are several CC--git migration subject, but they don't offer anything valuable to my problem. They deal with some ways to use git locally and push back to ClearCase, which is more or less the opposite of what I want to do.

I am responsible for integrating work from 2 production sites (I am also a programmer in one of these production site).

  • Site #1 (mine) is where integration is done and we use git (Single repository master/devel/topic branches)

  • Site #2 uses ClearCase...

Has anyone been in this situation and What do you suggest as a workflow to integrate their work into our git history ?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Félix Cantournet
  • 1,941
  • 13
  • 17

1 Answers1

2

Yes,the main advice is to realize that since ClearCase operates file by file (as opposed to git which has a commit for the all content of the repo), it is best to push to git a coherent states of the ClearCase view.
(See more differences between ClearCase and Git in this answer)

The usual way for a git repo to be aware of modifications done in a ClearCase view is to set the environment variables:

  • GIT_DIR to the path of the git repo (or a local clone of an upstream git repo)
  • GIT_WORK_TREE to the path of the ClearCase view

That way, you can get git status, git add, git commit working with the ClearCase file while updating your git repo index.

But I only check the diff, add and commit when I have, for instance, set a label (or in my case, an full UCM baseline), which marks a coherent set of files. Those modifications can then be detected and imported as a all in the git repo.

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