I only found a method that fetch/clone once, which is quite troublesome:
git submodule update --init --depth=1 At this time, the commit obtained by clone is usually not the one registered by the submodule, so an error will be reported
git ls-tree HEAD:(submodule的路径) Find the commit you want, such as
I only found a method that fetch/clone once, which is quite troublesome:
git submodule update --init --depth=1
At this time, the commit obtained by clone is usually not the one registered by the submodule, so an error will be reportedgit ls-tree HEAD:(submodule的路径)
Find the commit you want, such ascd to the clone repo of submodule (such as
.git/modules/tidy-html5
), fetch那个commitgit fetch abb031
git submodule update --no-fetch