I’m referencing a git submodule in my project, and now need to reference a specific SHA in the target git repo.
# .gitmodules
[submodule "vendor/plugins/ssl_requirement"]
path = vendor/plugins/ssl_requirement
url = git://github.com/retr0h/ssl_requirement.git
The SHA I want is bc96ad96407a72a60e0542cf3b0cecc6ff9e278e.
Submodules, by definition, always reference particular SHA1 in the subproject. That SHA1 isn’t expressed in the
.gitmodulesfile, but is instead expressed as the entry in the tree object that contains the submodule. The way you set this in git is bycding into the submodule, checking out the SHA1 you want, thencding back to the parent repo and committing your change, which will show up just like a changed file.So in your case what you can do is