0

Right now, I am working on a project with multiple packages, where each package has their own git repo. Is there a git command (or some plugin) that lets me change the branch of multiple packages at once?

For example, suppose I have

package a: branch mainline
package b: branch mainline

This command would then change the branches of both packages, so the result would be:

package a: branch features
package b: branch features.
alexgbelov
  • 3,032
  • 4
  • 28
  • 42

1 Answers1

0

I have solved this problem in my case by using find:

find . -name '.git' -execdir git checkout <branch> \;

This is of course wrappable to your bash-hacker heart's content.

Quentin
  • 62,093
  • 7
  • 131
  • 191