Any Way I Can Easily Merge Git Branches Created in CVS2Git Migration?

236 Views Asked by At

We recently did a migration of our CVS repository to Git.

In our CVS repository, we had some branches with code in them that we had stashed away after development was complete, until we had time to schedule them at a later point.

When we did the migration using CVS2Git, it resulted in the branches getting carried over to the Git repo, but the way it worked was that only the files that had actually been branched in CVS appeared in the Git branch.

So for example, if we had the following file/folder tree in CVS on the HEAD:

lib
   -com
      -example
         -folder1
            -file1a
            -file1b
         -folder2
            -file2a
            -file2b

And then we branched just the "file1a" and "file2b" files on a BRANCH_COOL_FEATURE branch in CVS, the resulting "BRANCH_COOL_FEATURE" branch in Git contains ONLY the "file1a" and "file2b" files.

I'm looking for the easiest way to identify all the files involved in the CVS branch that I'd want to merge in, including the point from where they were branched in CVS so I know exactly which diff to merge in, and then automatically do the merge.

This is the best I've got so far, but I was hoping there was a better way:

1) git diff --name-status on MASTER and BRANCH_COOL_FEATURE with a diff-filter set to M to identify all the files actually modified in the branch, or just take the full list of files in the branch 2) For each of the files, look at the CVS history and correlate the timestamps to identify the two generated Git commits for that file that represent the diff to be merged 3) Run git merge on that specific file and specify the two commits as the diff to merge in

Appreciate any help, thanks!

-Git newbie

p.s. I don't have a ton of details on how the actual CVS2Git conversion was run, but if it's important I can probably get a hold of it.

Is there any way to easily

0

There are 0 best solutions below