Hi Okay, as it turned out, a colleague working on the same project had modified the .gitmodules file to include a line
branch = some-old-branch This of course caused these "issues", as the "some-old-branch" hasn't been updated in a while. Modifying that file and/or running the following command solved the issue, basically: $ git config submodule.cookbooks/ew.branch master Cheers, Alexander Am Dienstag, 14. Februar 2017 16:56:01 UTC+1 schrieb Alexander Skwar: > > Hello > > I've got a project, where we are using Git submodules. When I clone the > project, all the submodules have the latest revisions, just like I'd want > it to be. > > I clone the project with this command on a server: > > $ git clone --branch test-environment --recursive > git@srv:customer/snbng.git /opt/kitchen > > $ git submodule > 3c860113895098bd9bab7a44554d61f41e6da14d cookbooks/apt > (SNBNG-Test-2016-11.01-3-g3c86011) > d2787f5f7a43e2dc31a7041007d49d0816acddc2 cookbooks/ew > (SNBNG-Test-2016-11.01-127-gd2787f5) > 7227fa172591e8dd64b37ea19c9d505f99a59f1a cookbooks/ew-bash_audit > (SNBNG-Test-2016-11.01-3-g7227fa1) > 7603620900e64c305c4788c0218f70d0c4647b1e cookbooks/ew-hardening > (SNBNG-Test-2016-11.01-2-g7603620) > 4b3ed2b04382ca545a96f4ac8d252afcc40eadb5 cookbooks/ew-ipa > (SNBNG-Test-2016-11.01-1-g4b3ed2b) > 7d9b87791f8e7ba64e23121c0faddad7779d45ba cookbooks/logrotate > (SNBNG-Test-2016-11.01) > 4db57708d6e61cde354244fe1a7b44048c3e78b5 cookbooks/openssh > (SNBNG-Test-2016-11.01-3-g4db5770) > 725835a5bc0dacb44a6a9cb2f90f35fc7377caa1 cookbooks/resolver > (SNBNG-Test-2016-11.01-2-g725835a) > 1ba050cf25f17688c002e7a5a2bf3742f9b5d71f cookbooks/sysctl > (v0.8.0-8-g1ba050c) > 43c5d9228ff92b94bf1e7eb55a9095f4aedc9e8d cookbooks/sysview > (SNBNG-Test-2016-11.01-2-g43c5d92) > c546d614109bedbd6a64b3c82da46b44162c3538 lxc-template-snbng > (SNBNG-Test-2016-11.01-50-gc546d61) > > Now I'd like to bring my submodules up-to-date (just assume, that there > might have passed some time between the clone command and the following > command). I run: > > $ git submodule update --remote > Submodule path 'cookbooks/ew': checked out > 'aa47bcc148ceec136747f16f6d4e155a87d046b5' > > > Well… Why? Why did the rev of "cookbooks/ew" change? And that's also not > the very latest revision of cookbooks/ew, but some months old. And further > more: > > $ git status > *HEAD detached at* aa47bcc > nothing to commit, working directory clean > > > Why detached head? What am I doing wrong here? > > Thanks for your help, > Alexander > -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
