void () { GitBrancher brancher = GitBrancher.getInstance(myProject); MultiMap<String, GitRepository> grouped = groupTrackedBranchesByName(); for (String remoteBranch : grouped.keySet()) { brancher.deleteRemoteBranch(remoteBranch, new ArrayList<>(grouped.get(remoteBranch))); } }