I'd like to specify a specific commit for a submodule, so whenever any mother repository is cloned with --recurse-submodules
of when someone does a git pull
, git submodule init
and git submodule update
, the version of these repositories are at a specified commit, and kept as such until someone changes said commit and pushes this change in the mother repository. I'd expect there to be something like having this content on the .gitmodules
:
[submodule "my_submodule_w=that_is_broken_on_the_lastest_commit"]
path = path/to/my/submodule
url = ../../relative/path/to/my/submodule
branch = master
commit = hash_of_the_commit_where_submodule_is_compatible
Is that or anything similar possible?