Interview Prep/Git & GitHub/Hooks, submodules, LFS and signing

What is a Git submodule?

BeginnerConceptHooks, submodules, LFS and signing
Answer

A pointer from a parent repo to a specific commit in another repo, recorded as a gitlink entry (mode 160000) plus .gitmodules. The parent pins an exact commit, so builds are reproducible.

git submodule add https://github.com/org/lib.git libs/lib
git clone --recurse-submodules https://github.com/org/app.git
git submodule update --init --recursive
All Git & GitHub questions Roadmap: Git & GitHub

More on Hooks, submodules, LFS and signing