2

I have a git repo with one submodule. I used the method described here to connect them.

Now, I'd like to use filter-branch to check out a specific revision from the submodule for each revision of the superproject. I wrote a script that does that, but checkout doesn't work, because in the temporary root, the submodule doesn't have .git directory...

Is there a way to do that?

Thanks.

Community
  • 1
  • 1
orgads
  • 678
  • 8
  • 21
  • Huh? Each revision of the superproject already has a submodule that points to a specific commit of the subproject. The fact that your submodule doesn't have a .git directory seems like a totally unrelated problem. – raylu Jul 10 '11 at 11:38
  • In the temporary directory that git creates for filter-branch, there is no .git directory, so I cannot checkout anything... – orgads Aug 15 '11 at 09:25
  • I would like to know the answer to this exact question, and the OP's answer (rebase) won't work in my case. – Walt D Feb 09 '13 at 05:00

1 Answers1

1

Well, I ended up doing git rebase -i, entering 'edit' for all relevant commits (I could find them with a regexp), and then used a script that does the actual submodule checkout, commit, rebase --continue.

I guess there isn't a straight-forward way to do that...

orgads
  • 678
  • 8
  • 21