简体   繁体   English

Intellij - 在多个git本地分支之间切换

[英]Intellij - switching between multiple git local branches

I am using Intellij on a project with multiple modules. 我在一个有多个模块的项目上使用Intellij。 I have started a big refactor and created local branches for 3 modules. 我已经启动了一个大型重构并为3个模块创建了本地分支。 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? 或者为所有模块创建一个分支? Thanks. 谢谢。

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. Git并选择“同步控制来自不同根的分支”,并且将立即对3个存储库执行分支上的所有操作(VCS - > Git - >分支)。

See details in this blogpost . 请参阅此博文中的详细信息。

Also make sure that all 3 modules are correctly registered in the roots table in Settings | 还要确保在Settings |中的根表中正确注册了所有3个模块 Version Control. 版本控制。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM