2

We have a bunch of git repositories:

  • drools
  • jbpm
  • guvnor
  • planner
  • ... (many more)

which are a git submodules in a super git repository, which is an aggregation of all these repositories, so the whole thing can be cloned at once and configured in our IDE at once. However casual developers can also only clone the module their are interested in.

The problem is, that when someone pushes a change to a subrepository, the super repository still is stuck on the previous commit of that subrepository. So someone of the non-casual developers has to update that super repository to the latest commit of that subrepository.

Is there any way to make the super repository automatically point to the latest commit of a subrepository?

We know that for every branch or tag in the super git repository (such as master, 5.1.x, 5.0.x, ...), there exists a branch or tag with the same name in each of the submodules.

Brad Werth
  • 17,411
  • 10
  • 63
  • 88
Geoffrey De Smet
  • 26,223
  • 11
  • 73
  • 120
  • 1
    possible duplicate of [Git submodules on master](http://stackoverflow.com/questions/4701004/git-submodules-on-master) – Cascabel Jan 21 '11 at 16:04

1 Answers1

1

No, this is not possible. The submodule is referenced by SHA1, (rather than a name), so it will always "stick" at that position.

I suggest you consider replacing the super-repo with a couple of scripts which accomplish what you want (regarding clone, pull, etc...)

gahooa
  • 131,293
  • 12
  • 98
  • 101