Create a git submodule from a specific repo hash or tag

后端 未结 1 1631
既然无缘
既然无缘 2021-02-01 07:46

I have a project which depends on Twitter bootstrap 2.x, however, when I add bootstrap as a submodule using the following:

git submodule add https://github.com/t         


        
1条回答
  •  -上瘾入骨i
    2021-02-01 08:39

    Once your submodule is created:

    cd /path/to/yoursubmodule
    git checkout yourTag
    cd ..
    git add yoursubmodule
    git commit -m "use submoduile at tag xx"
    git push
    

    You records that way the fact you want a submodule at a certain tag.

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