Pull git submodules after cloning project from GitHub

前端 未结 3 525
我在风中等你
我在风中等你 2021-01-30 08:10

I have a project that has specified submodules in it. Everything works well on the dev machine. I have commited .gitmodules file and pulled on the production. Howev

相关标签:
3条回答
  • 2021-01-30 08:28

    If there are nested submodules, you will need to use:

    git submodule update --init --recursive
    
    0 讨论(0)
  • 2021-01-30 08:44

    If you need to pull stuff for submodules into your submodule repositories use

    git pull --recurse-submodules
    

    But this will not checkout proper commits(the ones your master repository points to) in submodules

    To checkout proper commits in your submodules you should update them after pulling using

    git submodule update --recursive
    
    0 讨论(0)
  • 2021-01-30 08:45

    From the root of the repo just run:

    git submodule update --init
    
    0 讨论(0)
提交回复
热议问题