git - Does cloning a repo by a certain HASH include snapshot of included submodules? -


i need when cloning github repo submodules.
using generic command :

git clone --recursive ${git_source} -b master ${my_dir} 

and works fine.

however, wondering if cloning master branch hash include submodules "snapshot" (i.e. own commits corresponding particular master commit) or updated ones if ever make 1 "on road".

is possible achieve kind of result?

the sha1 of submodule repo 1 recorded in gitlink entry of parent repo index.

however, you can configure submodule follow branch of own remote repo, means can updated latest origin/master (if want follow master).

you need add, after git clone:

git submodule update --recursive --remote 

that update submodules content last fetched sha1 of respective remote repos.


once cloned , updated, a program git-archive-all can generate tarball snapshot of repo (including submodules)


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -