void (@NotNull Project project, DialogState dialogState) { VirtualFile selectedRoot = dialogState.selectedRoot; GitRemoteBranch selectedBranch = ((GitRemoteBranch)dialogState.selectedBranch); GitRepositoryManager repositoryManager = GitUtil.getRepositoryManager(project); GitRepository repository = repositoryManager.getRepositoryForRootQuick(selectedRoot); if (repository == null) { LOG.error("Unable to find git repository for root: " + selectedRoot.getPresentableUrl()); return; } if (repository.getCurrentBranch() == null) { LOG.error("Unable to rebase operation since repository is not on a branch"); return; } new GitUpdateExecutionProcess(project, singletonList(repository), Map.of(repository, new GitBranchPair(repository.getCurrentBranch(), selectedBranch)), UpdateMethod.REBASE, false) .execute(); }