internals - Where does Git store the SHA1 of the commit for a submodule? -
i know when add submodule git repository tracks particular commit of submodule referenced sha1.
i'm trying find sha1 value stored.
the .gitmodules
, .git/config
files show paths submodule, not sha1 of commit.
the git-submodule(1) reference speaks of gitlink
entry , gitmodules(5) reference doesn't either.
it stored in git's object database directly. tree object directory submodule lives have entry submodule's commit (this so-called "gitlink").
try doing git ls-tree master <path-to-directory-containing-submodule>
(or git ls-tree master
if submodule lives in top-level directory).
Comments
Post a Comment