Problem
In a project with multiple VCS roots (multi-repo project), the Create Branch dialog always shows Root: All by default. The dialog does not pre-select the repository based on the file currently open in the editor or the last used repository. This requires manual selection of the target repository for every new branch.
A warning is also shown when a specific root is selected instead of All.
Cause
The Execute Branch Operations on All Roots option is enabled in the project settings. When enabled, branch operations apply to all repositories in the project simultaneously, and the root selector in the Create Branch dialog defaults to All.
This setting is configured per project and is only present in projects with multiple VCS roots.
Resolution
Disable the Execute Branch Operations on All Roots option:
- Open settings:
- On Windows / Linux: File | Settings | Version Control | Git
- On macOS: IntelliJ IDEA | Settings | Version Control | Git
- In the Update section, uncheck Execute Branch Operations on All Roots.
- Click Apply and OK.
After disabling this option:
- The Create Branch dialog pre-selects the root based on the file currently open in the editor.
- When using the New branch from '<branch_name>' action, the dialog pre-selects the root of the selected branch.
If the option is not visible in Settings | Version Control | Git | Update, verify that the project has multiple VCS roots configured in File | Settings | Version Control | Directory Mappings. The option is hidden in single-root projects.
Comments
0 comments
Please sign in to leave a comment.