How do I git clone --recursive and checkout master on all submodules in a single line?

后端 未结 5 1055
失恋的感觉
失恋的感觉 2020-12-04 10:45

I really like this command to fetch a repo with submodules:

git clone git@github.com:my_user/my_repo.git --recursive

However, the submodule

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-04 11:38

    How about:

    git submodule update --init --recursive
    

    To initialize all submodules and submodules inside submodules. Not sure if this will checkout master though.

提交回复
热议问题