pull using git including submodule

前端 未结 2 897
长情又很酷
长情又很酷 2021-01-30 06:50

In one of my iOS project I have add a sub-module added, lets say a friend of my wants to pull it including the submodule, how can he do this? Whenever I tried to download the z

相关标签:
2条回答
  • 2021-01-30 07:21

    That's by design. Get the submodules as a second step.

    git clone git://url...
    cd repo
    git submodule init
    git submodule update
    

    Then afterwards, add another step after the git pull.

    git pull ...
    git submodule update --recursive
    

    Of course, this only works if the submodules are set up correctly in the first place...

    0 讨论(0)
  • 2021-01-30 07:36

    You can clone with the --recursive option in order to automatically initialize and update the submodules (and any submodules that those submodules contain, etc.)

    git clone --recursive <URL-OF-REPOSITORY>
    
    0 讨论(0)
提交回复
热议问题