How can I init/update git submodules in a remote?

前端 未结 1 1037
眼角桃花
眼角桃花 2021-01-26 19:25

I often use this pattern for easy deployment of websites:

I have a bare repo, which I push/pull to from my computer and this bare repo has a post-update hook that automa

1条回答
  •  时光说笑
    2021-01-26 19:36

    Do you have the ability to do more than a pull on the live server? You can do all of that in one (well, technically two) command:

    git pull && git submodule update --init --recursive
    

    This will recursively initialise and pull any submodules, and update existing submodules.

    Hope that helps.

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