Set branch for all Git Submodules

后端 未结 2 1127
伪装坚强ぢ
伪装坚强ぢ 2021-01-14 06:47

Is there a command to set the same branch name for all existing Git Submodules

git submodule add -b develop *

Basically I need a w

2条回答
  •  半阙折子戏
    2021-01-14 07:44

    See git submodule foreach.

    Evaluates an arbitrary shell command in each checked out submodule.

    git submodule foreach git checkout -b develop
    

提交回复
热议问题