0

My git repository has many submodules and some submodules' default branches are main and others are master.

I would like to pull from remote default branches using a command without error. If all submodules are using main or master, these commands works.

$ git submodule for each git pull origin master

or

$ git submodule for each git pull origin main

But, if mixed, I don't know how to do it. Does anyone know a good solution?

Atsushi Sakai
  • 938
  • 10
  • 22

0 Answers0