Note: since git 1.8.4 (August 2013), and commit 091a6eb, you don't have to be at top-level to run git submodule update
.
This is because git rev-parse
has a new --prefix
option.
--prefix <arg>
Behave as if git rev-parse was invoked from the
<arg>
subdirectory of the working tree.
Any relative filenames are resolved as if they are prefixed by<arg>
and will be printed in that form.
That same limitation is gone for git submodule add
as well.