Can git submodule update be made to fetch tags in submodules?

后端 未结 4 943
慢半拍i
慢半拍i 2021-02-04 02:57

I have a git repository which uses a submodule which I\'d like to point at an annotated tag, but when I do git submodule update new tags don\'t get fetched. I can g

4条回答
  •  独厮守ぢ
    2021-02-04 03:16

    Late answer here, but I'm surprised that no one mentioned git submodule foreach. This is basically the way I solved the exact problem you encountered:

    git submodule foreach --recursive 'git fetch --tags'
    git submodule update --recursive
    

    --recursive flag is there to recurse into child submodules.

提交回复
热议问题