Git: How to create a tag that also include submodules?

五迷三道 提交于 2019-12-24 19:15:50

问题


I got a project with many submodules, I just made a release and I want to tag it all.

I want to create a point where I can checkout in the future and it will include the current code of my project along with all the current code of all submodules.


回答1:


When you tag a commit, you are tagging the version of your submodules that is being used by that commit.

When you use a submodule, your commit includes the SHA of the commit in the submodule that your code is currently using. When you update the code in your submodule, you will see that you have changes to commit (the new SHA) in the super project. So, a tag will naturally work the way you want.



来源:https://stackoverflow.com/questions/33117090/git-how-to-create-a-tag-that-also-include-submodules

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!