1

How do you locate in GitHub a specific commit of a submodule from code that was cloned but is no longer in GitHub?

For example, I have a project that uses submodule A that in turns uses submodules B and C. I have all the source in my hard drive. Using this source, I just need to locate in GitHub a specific commit for the submodules, somehow.

Can this be done?

Hahnemann
  • 4,378
  • 6
  • 40
  • 64

1 Answers1

0

If your project on your disk is still a git repo, and the A folder is also a git repo (decalred as a submodule), then its current index would have the trace of the SHA1 used for B and C.

To see that "gitlink" (special index entry, mode 160000), do a:

 cd A
 git ls-tree HEAD B
 160000 commit <SHA1-used-by-B> B
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250