From: Ævar Arnfjörð Bjarmason Date: Mon, 16 Aug 2010 21:50:32 GMT Subject: Re: Commit ID of a branch Message-ID: In-Reply-To: On Mon, Aug 16, 2010 at 21:19, Guillermo wrote: > Hello, > > I want to write a script what checks in all my projects which is the submodule > commit that is registered in every git repo. > > Lets say we have the following structure: > > project1 > - submodule1 > project2 > - submodule1 > > I want to find out what file within the .git dir of every project contains the > proper submodule Commit ID that should be checkout with git submodule update. That ID is stored in a tree object, See e.g. git-ls-tree for how to get it.