문제

I have cloned a repo that includes a submodule. I know that running git submodule init inserts a reference to the submodule into .git/config, and that running git submodule update pulls the files from the submodule (as it stood at commit 3ab4ef2) into my main repo...

Now I'm on Windows here and can't use grep so I'm having trouble figuring out how my main git repo knows that it is tied to commit 3ab4ef2.

Where would I find a reference to that commit in my main repo?

도움이 되었습니까?

해결책

The commit hash for the submodule is stored in the tree object. You can find it by running git ls-tree -r HEAD^{tree} | less and searching for the directory where your submodule lives.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top