Assuming the following project layout:-
mainrepo_git
|____ .git
|____ .gitmodules
|____ proj <------- directory containing the code fil
Freezing is the whole point of submodules. You should really read a tutorial on it. In a nutshell, git add 3rdpartysourcecode
(important no trailing slash!) followed by a commit locks the currently checked out submodule commit to the supermodule commit. Then later you use git submodule update
to check out that revision.