0

I'm converting a CVS repo with a lot of modules to git.

Some of the modules I'm just going to combine with the main project in to one repo. But I want to keep 3 others as git submodules.

While developing the project in CVS, all 4 directories were tagged with the same tags. That way I can check out a complete version of the project.

I can convert 4 pieces of my CVS repo to 4 git repos. No problem.

But when I then check out one repo as the superproject and add the other 3 as submodules, they only exist in the version I then commit.

What I want is to be able to check out previous tags of the project (which are now tags in the git repo) and the associated tag in the submodules. I guess I need a ".gitmodules" file to appear in all those prior tags.

How do I do that?

Thanks, Rob

Rob Jacob
  • 1
  • 3

1 Answers1

0

You have to go into each submodule and repeat the command - assuming the same tags exist there.

git submodule foreach

command is useful in this case.

Adam Dymitruk
  • 124,556
  • 26
  • 146
  • 141
  • depends on what you need to do. If you want to checkout a tag, you can do so with `git submodule foreach git checkout rel1.2`. This assumes what you stated earlier that you will repeat tags into each of the modules. – Adam Dymitruk Jun 29 '12 at 22:23