Can't push commit Git repo using submodule

I recently added submodule "C" to my repo "B", then checked out a specific commit in submodule C (previous release of this tool that I want to include in B), then committed B and tried to push, I get this error:

$ git push --recurse-submodules=on-demand

      

...

Everything up-to-date
The following submodule paths contain changes that can
not be found on any remote:
  _submodules/C

Please try

        git push --recurse-submodules=on-demand

or cd to the path and use

        git push

to push them to a remote.

fatal: Aborting.
fatal: The remote end hung up unexpectedly
gitpub error:  process git-shell failed with status 128

      

I should mention that the commit in C that I checked is not parent / disabled (not sure why the developer chose to have it this way). This seems to be causing the problem when I want to push my post to B. It might also be appropriate to mention that B is also a submodule of the superproject A.

Thanks for any information you can provide.

+3


source to share


1 answer


Okay, being relatively new to Git, I missed that push command shouldn't include --recurse-submodules

for my purposes. I believe I got the post I did because I thought I would also like to push a commit to a submodule for which there was no branch.



+4


source







All Articles