When committing in the git submodule, you need to go to the superproject to execute the second commit, which is the new hash of the submodule.
It is incredibly annoying, easy to forget, and can cause all kinds of problems if you do not.
What I want to do:
- Commit changes to my submodule
- Let the hash automatically execute in the superproject
- And both the submodule and the superproject are pushed to their remote start ('git push')
What is the best way to find out if you are in a submodule, where is a super project, etc., and automate this?
Maybe some post-commit hook in the submodule?
source share