Understanding git submodule and “freezing” it at a specific commit hash or version

后端 未结 1 1303
误落风尘
误落风尘 2021-02-19 02:31

Assuming the following project layout:-

mainrepo_git
    |____ .git
    |____ .gitmodules
    |____ proj            <------- directory containing the code fil         


        
1条回答
  •  梦毁少年i
    2021-02-19 03:05

    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.

    0 讨论(0)
提交回复
热议问题