Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij - switching between multiple git local branches

I am using IntelliJ on a project with multiple modules. I have started a big refactoring and created local branches for 3 modules. Each branch has the same name. Currently, I have to checkout each of them (for each module, that is). Is there a way to do a global checkout? Or to create a single branch for all modules?

like image 879
sebi Avatar asked Feb 18 '23 05:02

sebi


1 Answers

Just go to Settings | Version Control | Git and select "Control branches from different roots synchronously", and all operations on branches (VCS -> Git -> Branches) will be performed for 3 repositories at once.

See details in this blogpost.

Also make sure that all 3 modules are correctly registered in the roots table in Settings | Version Control.

like image 94
LoKi Avatar answered Feb 22 '23 21:02

LoKi