git finding submodule commit message

Viewed 15

I update a submodule, then I open the parent repo in my git editor (gitkraken) and I see this update image. Where is the actual file with this value? When I right click and look at file path it just takes me to the submodule: C:\Users\aaa\PARENT_REPO\SUBMODULE_NAME.

My end goal is to sync a specific version of the parent to a specific version of the submodule

enter image description here

1 Answers

The submodule commit is encoded as a tree entry in the git repository (just like a file or directory). The only way* to modify the value is by updating the HEAD of the submodule and then making a commit in the parent.

*: That's actually a lie, but the technical answer would involve using git low-level tools (see e.g. documentation on git mktree).

Related